Updated documentation

posixStyleMatching
Aadhavan Srinivasan 1 month ago
parent 9a3bfca313
commit 43aa7b5876

@ -114,7 +114,11 @@ Another, more subtle example is the following regex:
x|xx x|xx
While the stdlib implementation (and most other engines) will prefer matching the first item of the alternation, While the stdlib implementation (and most other engines) will prefer matching the first item of the alternation,
this engine will _always_ go for the longest possible match, regardless of the order of the alternation. this engine will go for the longest possible match, regardless of the order of the alternation. Although this
strays from the convention, it results in a nice rule-of-thumb - the engine is ALWAYS greedy.
The stdlib implementation has a function [regexp.Regexp.Longest] which makes future searches prefer the longest match.
That is the default (and unchangable) behavior in this engine.
2. Byte-slices and runes: 2. Byte-slices and runes:

Loading…
Cancel
Save