fix buggy multiline matching of C<"a\nxb\n" =~ /(?!\A)x/m>
authorGurusamy Sarathy <gsar@cpan.org>
Wed, 31 May 2000 05:05:42 +0000 (05:05 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 31 May 2000 05:05:42 +0000 (05:05 +0000)
(from Ilya Zakharevich)

p4raw-id: //depot/perl@6172

regexec.c
t/op/re_tests

index 1ae9315..49a081f 100644 (file)
--- 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:
index 189077c..37e8ee3 100644 (file)
@@ -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       -       -