diff --git a/regex/doc.go b/regex/doc.go index 3dd4456..b35c02f 100644 --- a/regex/doc.go +++ b/regex/doc.go @@ -18,7 +18,7 @@ Single characters: [^abc] Negated character class - match any character except a, b and c [^a-z] Negated character range - do not match any character from a to z \[ Match a literal '['. Backslashes can escape any character with special meaning, including another backslash. - \452 Match the character with the octal value 452 (up to 3 digits) + \0452 Match the character with the octal value 452 (up to 4 digits, first digit must be 0) \xFF Match the character with the hex value FF (exactly 2 characters) \x{0000FF} Match the character with the hex value 0000FF (exactly 6 characters) \n Newline @@ -93,6 +93,10 @@ Lookarounds: (?<=x)y Positive lookbehind - Match y if preceded by x (? Match any number from x to y (inclusive) (x and y must be positive numbers) @@ -156,6 +160,7 @@ The following features from [regexp] are (currently) NOT supported: The following features are not available in [regexp], but are supported in my engine: 1. Lookarounds 2. Numeric ranges + 3. Backreferences I hope to shorten the first list, and expand the second. */