Also add a test for that, fill in test description, and sneak in a vim
modeline for re_tests
before it. And so on. \1 through \9 are always interpreted as
backreferences.
+If the bracketing group did not match, the associated backreference won't
+match either. (This can happen if the bracketing group is optional, or
+in a different branch of an alternation.)
+
X<\g{1}> X<\g{-1}> X<\g{name}> X<relative backreference> X<named backreference>
In order to provide a safer and easier way to construct patterns using
backreferences, Perl provides the C<\g{N}> notation (starting with perl
\g{0} - c - Reference to invalid group 0
\g{-0} - c - Reference to invalid group 0
(a)|\1 a y - -
-(a)|\1 x n - -
+(a)|\1 x n - Reference to group in different branch
+(?:(b)?a)\1 a n - Reference to group that did not match
(a)|\2 - c - Reference to nonexistent group
(([a-c])b*?\2)* ababbbcbc y $&-$1-$2 ababb-bb-b
(([a-c])b*?\2){3} ababbbcbc y $&-$1-$2 ababbbcbc-cbc-c
'[\x{100}\xff]'i \x{ff} y $& \x{ff}
((??{ "(?:|)" }))\s C\x20 y - -
+
+# vim: set noexpandtab