Well one hits the limit for the trie optimization, splitting into multiple regexes should be done.
Since $x =~ /a|b|c|d/ is like $x =~ /a|b/ or $x =~ /c|d/
i.e. it'll scale well.
But that's lost energy as long as the OP doesn't clarify his energy.
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
In reply to Re^3: Generate a regex from text
by LanX
in thread Generate a regex from text
by porg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |