Added lookarounds and numeric ranges to documentation
This commit is contained in:
11
regex/doc.go
11
regex/doc.go
@@ -84,6 +84,17 @@ Assertions:
|
||||
\b Match at a word boundary (a word character followed by a non-word character, or vice-versa)
|
||||
\B Match at a non-word boundary (a word character followed by a word character, or vice-versa)
|
||||
|
||||
Lookarounds:
|
||||
|
||||
x(?=y) Positive lookahead - Match x if followed by y
|
||||
x(?!y) Negative lookahead - Match x if NOT followed by y
|
||||
(?<=x)y Positive lookbehind - Match y if preceded by x
|
||||
(?<!x)y Negative lookbehind - Match y if NOT preceded by x
|
||||
|
||||
Numeric ranges:
|
||||
|
||||
<x-y> Match any number from x to y (inclusive) (x and y must be positive numbers)
|
||||
|
||||
# Flags
|
||||
|
||||
Flags are used to change the behavior of the engine. None of them are enabled by default. They are passed as variadic arguments to [Compile].
|
||||
|
Reference in New Issue
Block a user