#endif
#define REGINCLASS(p,c) (ANYOF_FLAGS(p) ? reginclass(p,c,0,0) : ANYOF_BITMAP_TEST(p,*(c)))
+#define REGINCLASS_utf8(p,c) (ANYOF_FLAGS(p) ? reginclass(p,c,0,1) : ANYOF_BITMAP_TEST(p,*(c)))
/*
* Forwards.
if (do_utf8) {
loceol = PL_regeol;
while (hardcount < max && scan < loceol) {
- bool cont = FALSE;
- if (ANYOF_FLAGS(p) & ANYOF_UNICODE) {
- if (reginclass(p, (U8*)scan, 0, do_utf8))
- cont = TRUE;
- }
- else {
- U8 c = (U8)scan[0];
-
- if (UTF8_IS_INVARIANT(c)) {
- if (ANYOF_BITMAP_TEST(p, c))
- cont = TRUE;
- }
- else {
- if (reginclass(p, (U8*)scan, 0, do_utf8))
- cont = TRUE;
- }
- }
- if (!cont)
- break;
+ if (!REGINCLASS_utf8(p, (U8*)scan))
+ break;
scan += UTF8SKIP(scan);
hardcount++;
}
$| = 1;
-print "1..968\n";
+print "1..972\n";
BEGIN {
chdir 't' if -d 't';
ok($a !~ /^\C{4}y/, q{don't match \C{4}y});
}
-# last test 968
+$_ = 'aaaaaaaaaa';
+utf8::upgrade($_); chop $_; $\="\n";
+ok(/[^\s]+/, "m/[^\s]/ utf8");
+ok(/[^\d]+/, "m/[^\d]/ utf8");
+ok(($a = $_, $_ =~ s/[^\s]+/./g), "s/[^\s]/ utf8");
+ok(($a = $_, $a =~ s/[^\d]+/./g), "s/[^\s]/ utf8");
+# last test 972