Re:Fast request routing using regular expressions
by nikic on Thursday February 20, 2014 @09:35AM
(#7270895)
You won't hit catastrophic backtracking problems with the types of regular expressions you need for routing.
Even if you do use some very weird expression, the worst that can happen is that you hit the backtracking limit and a route fails to match because of that. There won't be any code spinning indefinitely.
For this kind of problem you need to use actual regular expressions, not Perl's bastardization of the concept. Or produce your own DFA - it's not as hard as it looks, and gives you a much better idea what's going on.