&& !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)) {
else {
U8 *r = reghop3((U8*)s, -1, (U8*)startpos);
- tmp = (I32)utf8n_to_uvuni(r, s - (char*)r, 0, 0);
+ tmp = (I32)utf8n_to_uvchr(r, s - (char*)r, 0, 0);
}
tmp = ((OP(c) == BOUND ?
isALNUM_uni(tmp) : isALNUM_LC_uvchr(UNI_TO_NATIVE(tmp))) != 0);
else {
U8 *r = reghop3((U8*)s, -1, (U8*)startpos);
- tmp = (I32)utf8n_to_uvuni(r, s - (char*)r, 0, 0);
+ tmp = (I32)utf8n_to_uvchr(r, s - (char*)r, 0, 0);
}
tmp = ((OP(c) == NBOUND ?
isALNUM_uni(tmp) : isALNUM_LC_uvchr(UNI_TO_NATIVE(tmp))) != 0);
else {
if (prog->reganch & ROPT_UTF8 && do_utf8) {
U8 *s = reghop3((U8*)stringarg, -1, (U8*)strbeg);
- PL_regprev = utf8n_to_uvuni(s, (U8*)stringarg - s, NULL, 0);
+ PL_regprev = utf8n_to_uvchr(s, (U8*)stringarg - s, NULL, 0);
}
else
PL_regprev = (U32)stringarg[-1];
if (l >= PL_regeol) {
sayNO;
}
- if ((UTF ? utf8n_to_uvuni((U8*)s, e - s, 0, 0) : *((U8*)s)) !=
+ if ((UTF ? utf8n_to_uvchr((U8*)s, e - s, 0, 0) : *((U8*)s)) !=
(c1 ? toLOWER_utf8((U8*)l) : toLOWER_LC_utf8((U8*)l)))
sayNO;
s += UTF ? UTF8SKIP(s) : 1;
else {
U8 *r = reghop((U8*)locinput, -1);
- ln = utf8n_to_uvuni(r, s - (char*)r, 0, 0);
+ ln = utf8n_to_uvchr(r, s - (char*)r, 0, 0);
}
if (OP(scan) == BOUND || OP(scan) == NBOUND) {
ln = isALNUM_uni(ln);
I32 osize = PL_regsize;
I32 onpar = PL_regnpar;
- pm.op_pmflags = 0;
+ Zero(&pm, 1, PMOP);
re = CALLREGCOMP(aTHX_ t, t + len, &pm);
if (!(SvFLAGS(ret)
& (SVs_TEMP | SVs_PADTMP | SVf_READONLY)))
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);