From: Gurusamy Sarathy Date: Wed, 31 May 2000 05:05:42 +0000 (+0000) Subject: fix buggy multiline matching of C<"a\nxb\n" =~ /(?!\A)x/m> X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c2a735686052c4e782e029afd2945461349272c6;p=p5sagit%2Fp5-mst-13.2.git fix buggy multiline matching of C<"a\nxb\n" =~ /(?!\A)x/m> (from Ilya Zakharevich) p4raw-id: //depot/perl@6172 --- diff --git a/regexec.c b/regexec.c index 1ae9315..49a081f 100644 --- a/regexec.c +++ b/regexec.c @@ -1881,7 +1881,7 @@ S_regmatch(pTHX_ regnode *prog) } sayNO; case SBOL: - if (locinput == PL_regbol && PL_regprev == '\n') + if (locinput == PL_bostr) break; sayNO; case GPOS: diff --git a/t/op/re_tests b/t/op/re_tests index 189077c..37e8ee3 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -751,3 +751,4 @@ tt+$ xxxtt y - - '^\S\s+aa$'m \nx aa y - - (^|a)b ab y - - (?i) y - - +'(?!\A)x'm a\nxb\n y - -