http://www.perlmonks.org?node_id=1008121


in reply to Re^3: alternation in regexes: to use or to avoid?
in thread alternation in regexes: to use or to avoid?

Please read the benchmark numbers.

Alternation is MUCH faster than looping over trivial regexes, except when you use captures inside the alternations.