3 ms·
That does indeed implement grouping and alternative
by maweki 9y ago
That does indeed implement grouping and alternative
- abecedarius 9y agoIt's nicely coded but leaves out an important part of that algorithm: the regex derivatives never get simplified for comparison, so equal states appear different, so the set of states blows up as you march along the string. If you're OK with an inefficient matcher like that, then a backtracking algorithm probably gives you even simpler code.