3 ms·
parsing any context-free grammar[1] is provably impossible using pure regular expressions. but add backtracing support and you end up with one of my favorite st
by woodrowbarlow 7y ago
parsing any context-free grammar[1] is provably impossible using pure regular expressions. but add backtracing support and you end up with one of my favorite stackoverflow answers[2] of all time. (bonus: there's another legendary answer at the top of that question.)
1: https://en.wikipedia.org/wiki/Chomsky_hierarchy https://en.wikipedia.org/wiki/Chomsky_hierarchy
2: https://stackoverflow.com/a/5233151/3961271 https://stackoverflow.com/a/5233151/3961271