Regex Lesson 5: Optimization

Vote Up
Vote Down
I demonstrate how to reduce backtracking and make continuous improvements to your regular expression while benchmarking each change. The big takeaway from this is that you should design your regular expression to terminate early for non-matches.
Steve Wortham
3/17/2012 11:08:48 PM