diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-06-10 20:07:14 -0600 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-06-10 20:24:25 -0600 |
commit | c37d14f947f7998211b0455e453160fb7e15b22e (patch) | |
tree | f839da43719e9597f96bb0323f48f09447f44d93 /t | |
parent | 1a2d1f10228c7338d13ca19cb6e492b159fa70f0 (diff) | |
download | perl-c37d14f947f7998211b0455e453160fb7e15b22e.tar.gz |
Quantifier follows nothing in regex
This changes the code so that any '?' immediately (subject to /x rules)
following a {0} quantifier is absorbed immediately as part of that
quantifier. This allows the optimization to NOTHING to work for
non-greedy matches.
Thanks to Yves Orton for doing most of the leg work on this
Diffstat (limited to 't')
-rw-r--r-- | t/re/re_tests | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/t/re/re_tests b/t/re/re_tests index a3179049eb..ae28e141e1 100644 --- a/t/re/re_tests +++ b/t/re/re_tests @@ -1740,4 +1740,8 @@ m?^xy\?$? xy? y $& xy? # patterns ^(\x{100}|a)(??{ qr/.?\xF7/d}) a_\xF7 y - - +# [perl #118375] +/(a|(bc)){0,0}?xyz/ xyz y $& xyz +/( a | ( bc ) ) {0,0} ? xyz/x xyz y $& xyz + # vim: softtabstop=0 noexpandtab |