Re:Efficiency of regular expressions
by dedward on Friday January 21, 2011 @10:13AM
(#2127539)
This would be highly dependent on the implementation of the regex engine itself, would it not?
[ Parent
| on HN ]
Right. The size of the difference will depend on the implementation details (e.g. if it uses backtracking or not), but the form the GP proposes will never be slower. And arguably it better captures the intent of the RE.