&& !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)) {
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);