diff --git a/regex/doc.go b/regex/doc.go index 398ec07..1b821c1 100644 --- a/regex/doc.go +++ b/regex/doc.go @@ -114,7 +114,11 @@ Another, more subtle example is the following regex: x|xx 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: