Re: [perl #37688] Unexpected regex failure.
Hugo van der Sanden [Wed, 16 Nov 2005 14:54:55 +0000 (14:54 +0000)]
Message-Id: <200511161454.jAGEst117787@zen.crypt.org>

p4raw-id: //depot/perl@26137

regexec.c
t/op/re_tests

index e058216..6e234a2 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -518,6 +518,7 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
                     || ((slen = SvCUR(check)) > 1
                         && memNE(SvPVX_const(check), s, slen)))
                goto report_neq;
+           check_at = s;
            goto success_at_start;
          }
        }
index 28deb0f..8520d99 100644 (file)
@@ -958,3 +958,4 @@ x(?#        x       c       -       Sequence (?#... not terminated
 (a|aa|aaa|aaaa|aaaaa|aaaaaa)(??{$1&&"foo"})(b|c)       aaaaaaaaaaaaaaab        n       -       -
 ^(a*?)(?!(aa|aaaa)*$)  aaaaaaaaaaaaaaaaaaaa    y       $1      a       # [perl #34195]
 ^(a*?)(?!(aa|aaaa)*$)(?=a\z)   aaaaaaaa        y       $1      aaaaaaa
+^(.)\s+.$(?(1))        A B     y       $1      A       # [perl #37688]