Is it possible to build a regex::Regex
from a regex_automata::meta::Regex
?
#1197
-
I'm using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Good question. This is similar to questions folks have asked in the past (before
With that said, not all hope is lose here because there is a stable interface between It does sound wasteful, and technically, it is. But necessarily so given the constraints above. With that said, it is probably not as wasteful as you might think. In particular, the parsing and creation of an |
Beta Was this translation helpful? Give feedback.
Good question. This is similar to questions folks have asked in the past (before
regex-automata
existed) like, "If I have anHir
fromregex-syntax
, can I use that to directly build aregex::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 ifregex-automata
were a public dependency ofregex
. That in turn would mean that every timeregex-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 thatregex-automata
could not evolve independently ofregex
. That is, it…