rustexp
rustexp copied to clipboard
Support non-unicode flag
It would be cool to support the regex::bytes::Regex matcher using the non-unicode flag. If I try this regex:
(?-u).
I get the following error:
Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
(?-u).
^
error: pattern can match invalid UTF-8
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)
In fact you may just want to use the regex::bytes::Regex unconditionally.