Skip to content

Is it possible to build a regex::Regex from a regex_automata::meta::Regex? #1197

Answered by BurntSushi
xmo-odoo asked this question in Q&A
Discussion options

You must be logged in to vote

Good question. This is similar to questions folks have asked in the past (before regex-automata existed) like, "If I have an Hir from regex-syntax, can I use that to directly build a regex::Regex?" The answer to that is basically the same answer to your question: definitively and intentionally not. The only way for a conversion like the one you're asking for to exist is if regex-automata were a public dependency of regex. That in turn would mean that every time regex-automata had a semver incompatible release, regex would also need a semver compatible release. This is not something I can abide, because it would imply that regex-automata could not evolve independently of regex. That is, it…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BurntSushi
Comment options

@xmo-odoo
Comment options

Answer selected by BurntSushi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants