-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
I call forward backreference one that appears before the group it refers to.
Defined at: http://php.net/manual/en/regexp.reference.back-references.php
However, if the decimal number following the backslash is less than 10, it is always taken as a back reference, and causes an error only if there are not that many capturing left parentheses in the entire pattern. In other words, the parentheses that are referenced need not be to the left of the reference for numbers less than 10. A "forward back reference" can make sense when a repetition is involved and the subpattern to the right has participated in an earlier iteration. See the section entitled "Backslash" above for further details of the handling of digits following a backslash.