Closed tlemo closed 1 day ago
Thank you for your feedback! Will be fixed.
The problem is actually in the regex converter, which takes the "signature" of a regex engine to make sure it complies and also converts non-supported regex syntax to syntax the the regex engine supports.
Line 53 in include/reflex/matcher.h
should be updated to add a 0
after the W
to natively support \0
escapes:
static std::string convert(T regex, convert_flag_type flags = convert_flag::none, bool *multiline = NULL)
{
return reflex::convert(regex, "imsx#=^:abcdefhijklnrstuvwxzABDHLNQSUW0<>?", flags, multiline);
}
I've committed a minor update that will be included in the next official release 5.1.
The documentation says that
\0
matches the NUL character, but at least when using the default matcher,\0
seems to be treated as the prefix for an octal encoding of a character