Question: Are both versions of perlrunning in the same box? If so, 5.8.8 seems to be faster that 5.10.1 for both regexps!
From these results, s/\s*,\s*/,/ is faster than the longer one. Backtracking is better than alternations? Replacing always is better than selective ones?
In reply to Re^2: Comparing Regular Expressions
by vitoco
in thread Comparing Regular Expressions
by vitoco
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |