c++ - How can you detect if two regular expressions overlap in the strings they can match? -
I have a regular expression container, I want to analyze them to determine if they It is possible to produce a food string. In the case of this use, the lack of writing your own Regex engine, is there an easy way to solve this problem in C ++ or Python? There is no easy way. Unless your regular expression only uses the standard features (Perl lets you embed the arbitrary code in Milan, I think), you can generate from each one that is available for RE matches. Enters all the stars in a solid way. Looking at any pair of NFA, the intersection is empty if the intersection is not empty, some string matches (and vice versa) matches the RE. The standard decidability proof is to determine them in the first place, and then to build a new DFA whose states are two pairs of two DFA, and whose last state, those two states in fact that pair Are the last in their original DFA. Alternatively, if you have already shown the NFA supplement to calculate, then you can get the intersection by...