diff options
author | Yves Orton <demerphq@gmail.com> | 2007-01-10 21:33:39 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-01-11 14:47:01 +0000 |
commit | ee9b8eaedac8053a01cc9281ada34dd182a8f7d0 (patch) | |
tree | 129df8e187e17fb664051b0f7f9a1b55d46fcecd /pod/perl595delta.pod | |
parent | b4390064818aaae08b8f53f740ea62f7dd8517a1 (diff) | |
download | perl-ee9b8eaedac8053a01cc9281ada34dd182a8f7d0.tar.gz |
Add Regexp::Keep \K functionality to regex engine as well as add \v and \V, cleanup and more docs for regatom()
Message-ID: <9b18b3110701101133i46dc5fd0p1476a0f1dd1e9c5a@mail.gmail.com>
(plus POD nits by Merijn and myself)
p4raw-id: //depot/perl@29756
Diffstat (limited to 'pod/perl595delta.pod')
-rw-r--r-- | pod/perl595delta.pod | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/pod/perl595delta.pod b/pod/perl595delta.pod index 0497d55781..47fbaf51a1 100644 --- a/pod/perl595delta.pod +++ b/pod/perl595delta.pod @@ -107,9 +107,9 @@ would expect. This is considered a feature. :-) (Yves Orton) =item Possessive Quantifiers -Perl now supports the "possessive quantifier" syntax of the "atomic match" +Perl now supports the "possessive quantifier" syntax of the "atomic match" pattern. Basically a possessive quantifier matches as much as it can and never -gives any back. Thus it can be used to control backtracking. The syntax is +gives any back. Thus it can be used to control backtracking. The syntax is similar to non-greedy matching, except instead of using a '?' as the modifier the '+' is used. Thus C<?+>, C<*+>, C<++>, C<{min,max}+> are now legal quantifiers. (Yves Orton) @@ -129,6 +129,21 @@ that contain backreferences. (Yves Orton) =back +=item Regexp::Keep internalized + +The functionality of Jeff Pinyan's module Regexp::Keep has been added to +the core. You can now use in regular expressions the special escape C<\K> +as a way to do something like floating length positive lookbehind. It is +also useful in substitutions like: + + s/(foo)bar/$1/g + +that can now be converted to + + s/foo\Kbar//g + +which is much more efficient. + =head2 The C<_> prototype A new prototype character has been added. C<_> is equivalent to C<$> (it |