Document the new (?FAIL) assertion (Yves Orton)
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 26 Oct 2006 16:11:26 +0000 (16:11 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Thu, 26 Oct 2006 16:11:26 +0000 (16:11 +0000)
p4raw-id: //depot/perl@29119

pod/perlre.pod

index 1a95297..b46b381 100644 (file)
@@ -933,6 +933,15 @@ the same name, then it recurses to the leftmost.
 It is an error to refer to a name that is not declared somewhere in the
 pattern.
 
+=item C<(?FAIL)> C<(?F)>
+X<(?FAIL)> X<(?F)>
+
+This pattern matches nothing and always fails. It can be used to force the
+engine to backtrack. It is equivalent to C<(?!)>, but easier to read. In
+fact, C<(?!)> gets optimised into C<(?FAIL)> internally.
+
+It is probably useful only when combined with C<(?{})> or C<(??{})>.
+
 =item C<< (?>pattern) >>
 X<backtrack> X<backtracking> X<atomic> X<possessive>