What you really need to know about regular expressions before using them
Posted by: Rico Marianis Performance Tidbits,
on 21 Jul 2015 |
View original | Bookmarked: 0 time(s)
Approach #1 -- Non-deterministic Finite Automaton
This approach first converts the regular expression into a non-deterministic state machine, which is just like a state machine expect you have to keep track of all the states you might be in. Sort of like when you have a choice of going left or right you go both ways and remember it could be either. The state machine you get from this approach is proportional to the size of the expression in a fairly direct way and does not depend...