3 ms·
Recursive RegEx has always been confusing to me. https://www.rexegg.com/regex-recursion.html https://www.rexegg.com/regex-recursion.html
by mycall 7y ago
Recursive RegEx has always been confusing to me.
https://www.rexegg.com/regex-recursion.html https://www.rexegg.com/regex-recursion.html
- asicsp 7y agoRailroad diagrams may help. I use a three step approach to present one example of recursion, which includes showing the difference between two-level nesting vs recursive version [1]. This is the railroad visualization for two-level [2]. [1] https://github.com/learnbyexample/py_regular_expressions/blob/master/py_regex.md#recursive-matching https://github.com/learnbyexample/py_regular_expressions/blo... [2] https://www.debuggex.com/r/SMLRfiyt0Ag2hXu5 https://www.debuggex.com/r/SMLRfiyt0Ag2hXu5