3 ms·
I think one of the reasons is the ".+z" gets bigger and uglier after you convert it to a deterministic automaton.
by ufo 3y ago
I think one of the reasons is the ".+z" gets bigger and uglier after you convert it to a deterministic automaton.
- daveFNbuck 3y agoThey show the DFA for it on the site, it's 3 states. There's a starting state for the first . and then two states that transition back and forth between whether z was the last character or not. I think what's actually happening here is that they're doing the intersection on the DFAs and then producing a regex from the resulting DFA. The construction of a regex from a DFA is where things get ugly and weird.