projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1e4aa4a
)
[perl #112604] perlre man page contains suspect example of recursion
author
Ronald J Kimball
<rjk@tamias.net>
Thu, 24 May 2012 01:17:16 +0000
(18:17 -0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Thu, 24 May 2012 01:18:05 +0000
(18:18 -0700)
Jim Avera wrote:
> This seems incorrect because the \s++ eats all white space without
> backtracking, preventing the following \s+ from matching.
> Thus the pattern always fails for any input.
It should be \s+ \+ \s+
pod/perlre.pod
patch
|
blob
|
history
diff --git
a/pod/perlre.pod
b/pod/perlre.pod
index
9c5c3ad
..
b4bb45e
100644
(file)
--- a/
pod/perlre.pod
+++ b/
pod/perlre.pod
@@
-1453,7
+1453,7
@@
easier to embed recursive patterns inside of a C<qr//> construct
for later use:
my $parens = qr/(\((?:[^()]++|(?-1))*+\))/;
- if (/foo $parens \s+ + \s+ bar $parens/x) {
+ if (/foo $parens \s+
\
+ \s+ bar $parens/x) {
# do something here...
}