Skip to content

Commit b315dd0

Browse files
committed
Update RegexSyntax.md
1 parent f79fb92 commit b315dd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Documentation/Evolution/RegexSyntax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ NumberRef -> ('+' | '-')? <Decimal Number> RecursionLevel?
476476
RecursionLevel -> '+' <Int> | '-' <Int>
477477
```
478478

479-
A reference is an abstract identifier for a particular capturing group in a regular expression. It can either be named or numbered, and in the latter case may be specified relative to the current group. For example `-2` refers to the capture group `N - 2` where `N` is the number of the next capture group. References may refer to groups ahead of the current position e.g `+3`, or the name of a future group. These may be useful in recursive cases where the group being referenced has been matched in a prior iteration.
479+
A reference is an abstract identifier for a particular capturing group in a regular expression. It can either be named or numbered, and in the latter case may be specified relative to the current group. For example `-2` refers to the capture group `N - 2` where `N` is the number of the next capture group. References may refer to groups ahead of the current position e.g `+3`, or the name of a future group. These may be useful in recursive cases where the group being referenced has been matched in a prior iteration. If a referenced capture does not exist anywhere in the regular expression, the reference is diagnosed as invalid.
480480

481481
A backreference may optionally include a recursion level in certain cases, which is a syntactic element inherited [from Oniguruma][oniguruma-syntax] that allows the reference to specify a capture relative to a given recursion level.
482482

0 commit comments

Comments
 (0)