On Mon, Jul 29, 2013 at 07:21:09PM +0200, demerphq wrote: > On 29 July 2013 18:34, Philip Hazel <perlbug-followup@perl.org> wrote: > > $ perl -e '/a{0}?/' > > Quantifier follows nothing in regex; marked by <-- HERE in m/a{0}? <-- HERE / > > at -e line 1. > > > > I know this is a pathological case, but Perl used to accept it. It is > > quite happy as long as the quantifier is not zero. > > More {0} => NOTHING fallout, but I *think* this is fixed already. Porting/bisect.pl --start=v5.16.0 --end=v5.18.0 --target=miniperl -e '/a{0}?/' broken by 3018b823898645e44b8c37c70ac5c6302b031381 Porting/bisect.pl --expect-fail --start v5.18.0 --target=miniperl -e '/a{0}?/' fixed in blead by c37d14f947f7998211b0455e453160fb7e15b22e commit c37d14f947f7998211b0455e453160fb7e15b22e Author: Karl Williamson <public@khwilliamson.com> Date: Mon Jun 10 20:07:14 2013 -0600 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 fixed in maint-5.18 by 0ec7dc753859025ffc69eb02bf79a3f27f794ab1 Fix regex seqfault 5.18 regression according to Porting/bisect.pl --expect-fail --start v5.18.0 --end 9de5f9548e6b2b322163ba0386f30c853d6111e2 --target=miniperl -e '/a{0}?/' Was there an existing ticket in RT for the fixed bug? It would be good to hang all these tickets off a ticket (or merge them?) Also, presumably we should add Philip Hazel's test cases as regression tests. Nicholas ClarkThread Previous | Thread Next