X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlre.pod;h=42017ddf6629661a082bb46ab08273ae43864308;hb=93592fd5aeec89ac25994a493ef54e1d7a572d65;hp=df627ff0120127122b3528ee39e1dc13d6c25960;hpb=e95d73140218cc53e63e359a04270e05457c786f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlre.pod b/pod/perlre.pod index df627ff..42017dd 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -518,6 +518,10 @@ backreference only if at least 11 left parentheses have opened 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 X In order to provide a safer and easier way to construct patterns using backreferences, Perl provides the C<\g{N}> notation (starting with perl