This converts one case where ANYOFV is now usable to allow it to match
more than one character.
break;
case ANYOFV:
case ANYOF:
- if (utf8_target) {
+ if (utf8_target || OP(p) == ANYOFV) {
+ STRLEN inclasslen;
loceol = PL_regeol;
- while (hardcount < max && scan < loceol &&
- reginclass(prog, p, (U8*)scan, 0, utf8_target)) {
- scan += UTF8SKIP(scan);
+ inclasslen = loceol - scan;
+ while (hardcount < max
+ && ((inclasslen = loceol - scan) > 0)
+ && reginclass(prog, p, (U8*)scan, &inclasslen, utf8_target))
+ {
+ scan += inclasslen;
hardcount++;
}
} else {