Theoretically regex equivalence is a hard problem having naive solution with exponential space and time complexity. But for practical purposes, is there an approximate equivalence measure for regexes?
I'm thinking about generating random strings from first regex and then checking it against the other and then repeat it the other way. Is there a more elegant check available?
Relevant links:
- Regular expressions Equivalence
- https://cstheory.stackexchange.com/questions/20401/sub-optimal-regex-equivalence
PS : I want to code the approach in java though general solutions and ideas are welcome.