Teach the Rust compiler how to generate regular expressions that the regex crate knows how to read (mostly lots of errors for unsupported features), and how to generate regular expressions that the regex_fancy crate knows how to parse (there might be a few small syntactic differences vs. Python that need to be special cased).
Every to_regex() call includes a Flavor parameter that can be used to change the output when outputting regex for different engines. That's a good place to start, that and the Python and Rust regex implementations.
Teach the Rust compiler how to generate regular expressions that the
regex
crate knows how to read (mostly lots of errors for unsupported features), and how to generate regular expressions that theregex_fancy
crate knows how to parse (there might be a few small syntactic differences vs. Python that need to be special cased).Every
to_regex()
call includes aFlavor
parameter that can be used to change the output when outputting regex for different engines. That's a good place to start, that and the Python and Rust regex implementations.