Implement Backreferences #3
@@ -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
|
||||
(?<!x)y Negative lookbehind - Match y if NOT preceded by x
|
||||
|
||||
Backreferences:
|
||||
|
||||
(xy)\1 Match 'xy' followed by the text most recently captured by group 1 (in this case, 'xy')
|
||||
|
||||
Numeric ranges:
|
||||
|
||||
<x-y> 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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user