X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=regexec.c;h=e358d63d5f2d5e18fc45aca59ec2d725d460ee8b;hb=7013e6ae0ee41c19b7e4c3937d6f838af15b9af8;hp=cfe77f5c352973cd1b53b1efb2dfa9650874e896;hpb=2b9d42f0ba1bb562fe21327dc7948ab1a5397a19;p=p5sagit%2Fp5-mst-13.2.git diff --git a/regexec.c b/regexec.c index cfe77f5..e358d63 100644 --- a/regexec.c +++ b/regexec.c @@ -392,7 +392,8 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos, && !PL_multiline ) ); /* Check after \n? */ if (!ml_anch) { - if ( !(prog->reganch & ROPT_ANCH_GPOS) /* Checked by the caller */ + if ( !(prog->reganch & (ROPT_ANCH_GPOS /* Checked by the caller */ + | ROPT_IMPLICIT)) /* not a real BOL */ /* SvCUR is not set on references: SvRV and SvPVX overlap */ && sv && !SvROK(sv) && (strpos != strbeg)) { @@ -3245,9 +3246,15 @@ S_regmatch(pTHX_ regnode *prog) c = utf8_to_uvchr((U8*)PL_reginput, NULL); else c = UCHARAT(PL_reginput); + /* If it could work, try it. */ + if (c == c1 || c == c2) + { + TRYPAREN(paren, n, PL_reginput); + REGCP_UNWIND(lastcp); + } } /* If it could work, try it. */ - if (c1 == -1000 || c == c1 || c == c2) + else if (c1 == -1000) { TRYPAREN(paren, n, PL_reginput); REGCP_UNWIND(lastcp);