News for hackers. Stuff that matters.
Re:Fast request routing using regular expressions by JadeNB on Thursday February 20, 2014 @03:19PM (#7273270)
Good point: a DFA can do exactly what joosters asked, namely, distinguish between "matched regex '(a|b)' to input 'a'" and "matched regex '(a|b)' to input 'b'". However, it may be worth noting—as I'm sure you know, but others may not—that there is no way for even a juiced-up DFA to say, for example, how many a's were actually in the input when the regex is 'a * ' (spaces to fool the Markdown processor).

P.S. I might as well mention that I obviously meant to refer to a DFA reaching its end, rather than start, state.

There are no comments on this comment yet.