Let's say that two regular expressions e1
and e2
collide if there exists any string s
, such that both e1
and e2
match s
.
Is there any easy (efficient) way to check if two regular expressions collide without iterating over the set of all possible strings in our dictionary?
Note 1: I don't know if this is called in some other manner in the literature. Maybe I'm just lacking of the proper name to search this.
Note 2: The ideal answer for me is written PHP code, but I accept any suggestion, not necessarily PHP.