This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: [perl #133984] Failure in lookbehind
authorKarl Williamson <khw@cpan.org>
Fri, 22 Mar 2019 20:54:33 +0000 (14:54 -0600)
committerKarl Williamson <khw@cpan.org>
Fri, 22 Mar 2019 21:01:39 +0000 (15:01 -0600)
commit39ce401c1db32fe69d69d11cfd7b62071e52f43a
tree4b770f701b42174defcbc44399f488cf812f179d
parent62286d5869e7680741523d2a11be77cb79b83c99
PATCH: [perl #133984] Failure in lookbehind

I thought that lookbehind assertions weren't supposed to look beyond the
current position; but this CPAN module demonstrates that they can look
ahead as well.

I built some infrastructure to prevent them from looking ahead.  In
part, this is because Unicode recommends that pattern matching have the
ability to restrict the area of the target being matched.  That
infrastructure is not needed at this time.  But I think we should leave
it in for now anyway, as we see what other bugs the variable length
lookbehind changes may have caused.

So this patch just takes the easy way out, and at the place where it
would restrict the area searched, it uses the full width.  It's a one
line change.
regexec.c
t/re/pat_advanced.t