diff --git a/regex/doc.go b/regex/doc.go index 1b821c1..9ca1f04 100644 --- a/regex/doc.go +++ b/regex/doc.go @@ -4,6 +4,8 @@ Package regex implements regular expression search, using a custom non-bracktrac The engine relies completely on UTF-8 codepoints. As such, it is capable of matching characters from other languages, emojis and symbols. +The API and regex syntax are largely compatible with that of the stdlib's [regexp], with a few key differences (see 'Key Differences with regexp'). + The full syntax is specified below. # Syntax @@ -55,8 +57,8 @@ POSIX classes (inside normal character classes): Composition: def Match d, followed by e, followed by f - x|y Match x or y (prefer longer one) - xy|z Match xy or z + x|y Match x or y (prefer x) + xy|z Match xy or z (prefer xy) Repitition (always greedy, preferring more): @@ -94,10 +96,11 @@ Lookarounds: Numeric ranges: Match any number from x to y (inclusive) (x and y must be positive numbers) + \