On Mon, Jul 29, 2013 at 07:18:55PM +0200, demerphq wrote: > On 29 July 2013 18:26, Philip Hazel <perlbug-followup@perl.org> wrote: > > $ perl -e '"b" =~ /(?1)(?:(b)){0}/; print ">$&<\n";' > >>< > > > > In previous versions of Perl, this would print >b< that is, the regex matched > > "b", which is what I think it should. > > I think this is fallout from the {0} => NOTHING optimization. It > appears this optimization cannot be applied when the patterns are > recursive. Yes Porting/bisect.pl --start=v5.16.0 --end=v5.18.0 --target=miniperl -e '"b" =~ /(?1)(?:(b)){0}/; die ">$&<" unless $& eq "b"' Broken by 3018b823898645e44b8c37c70ac5c6302b031381 Porting/bisect.pl --expect-fail --start v5.18.0 --target=miniperl -e '"b" =~ /(?1)(?:(b)){0}/; die ">$&<" unless $& eq "b"' Fixed by 2e3a23da260a7ec5d61b81cb34c38de5e528b41d Nicholas ClarkThread Previous | Thread Next