Add support to match on binary input. The -u flag is not enough because the input is iterated as Runes. The Regex object should contain a binary_mode flag so the input is treated as binary data in all the APIs.
The regex pattern supports \x{007F} and \u007F to match raw bytes so we don't need to treat it as binary. Throw an error if a unicode char is found, as it won't ever match the input. It must generate the nodes to match ASCII.
Add support to match on binary input. The
-u
flag is not enough because the input is iterated as Runes. The Regex object should contain abinary_mode
flag so the input is treated as binary data in all the APIs.The regex pattern supportsIt must generate the nodes to match ASCII.\x{007F}
and\u007F
to match raw bytes so we don't need to treat it as binary. Throw an error if a unicode char is found, as it won't ever match the input.