break;
case ANYOFM: /* ARG() is the base byte; FLAGS() the mask byte */
- /* UTF-8ness doesn't matter, so use 0 */
+ /* UTF-8ness doesn't matter because only matches UTF-8 invariants, so
+ * use 0 */
REXEC_FBC_FIND_NEXT_SCAN(0,
(char *) find_next_masked((U8 *) s, (U8 *) strend,
(U8) ARG(c), FLAGS(c)));
break;
- case NANYOFM:
- REXEC_FBC_FIND_NEXT_SCAN(0,
+ case NANYOFM: /* UTF-8ness does matter because can match UTF-8 variants.
+ */
+ REXEC_FBC_FIND_NEXT_SCAN(utf8_target,
(char *) find_span_end_mask((U8 *) s, (U8 *) strend,
(U8) ARG(c), FLAGS(c)));
break;
skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
skip_all_without_unicode_tables();
-plan tests => 861; # Update this when adding/deleting tests.
+plan tests => 862; # Update this when adding/deleting tests.
run_tests() unless caller;
'/[\S\s]/l works');
}
+ { # perl #133995]
+ use utf8;
+ fresh_perl_is('"έδωσαν ελληνικήვე" =~ m/[^0](?=0)0?/', "", {},
+ '[^0] doesnt crash on UTF-8 target string');
+ }
+
} # End of sub run_tests
1;