3 ms·
No discussion about exponential backtracking in regexes is complete without a mention of this infamous article: https://swtch.com/~rsc/regexp/regexp1.html https
by userbinator 3y ago
No discussion about exponential backtracking in regexes is complete without a mention of this infamous article: https://swtch.com/~rsc/regexp/regexp1.html https://swtch.com/~rsc/regexp/regexp1.html
That said, looking at this particular application, I would not use a regex at all, but simple substring scanning.
- richbell 3y agoWhat's wrong with that article? It seems like a pretty interesting resource.