#Elegant way of writing regex in Rust
8 messages ยท Page 1 of 1 (latest)
I see you are constructing the regex string from the builder. May I introduce you to https://docs.rs/regex-syntax/0.7.4/regex_syntax/index.html. Unfortunately, regex doesn't expose a build_from_hir method, but regex::Regex is a light wrapper around regex_automata::meta::Regex which does have such a method: https://docs.rs/regex-automata/0.3.6/regex_automata/meta/struct.Builder.html#method.build_from_hir
A builder for configuring and constructing a Regex.
This might make the code a lot simpler and less error prone. I believe you can also turn the Ast into a regex using the ast::Printer which might help with your original API
ok, thanks!
This looks like a pretty cool project
You might want to rename Standart to Standard though and make the logic module private
damn am i so dumb?
