Re:Regexper – Regular expressions visualizer
by jnordwick on Tuesday January 30, 2018 @01:38PM
(#16267722)
Thad first one doesn't seem very good. It seems like there are many places states could be merged. Eg, there are 4 different "^0" states and 3 "^1" states. or am i misreading something?
[ Parent
| on HN ]
Re:Regexper – Regular expressions visualizer
by hughes on Tuesday January 30, 2018 @01:51PM
(#16267837)
Amazing how being able to visualize the problem reveals available optimizations!
Re:Regexper – Regular expressions visualizer
by jnordwick on Tuesday January 30, 2018 @06:41PM
(#16270147)
A regular regex doesn't need to be optimized how it is written if the matcher is dfa based because the minimal dfa is unique. Regex engines however are more complex than that, and the structure this shows isn't going to be how it is actually recognized.
This should reallt only be used for understand what regex matches, not as am optimization tool. In that regard it should display the simplest graph possible to aid understanding.