go ahead... be a heretic | |
PerlMonks |
Re: Regex Problem - alternative searchedby xicheng (Sexton) |
on May 18, 2007 at 15:30 UTC ( [id://616218]=note: print w/replies, xml ) | Need Help?? |
Hi, I looked at the posts in the link you provided. one of the scenarios looks like exponential explosion when using alternations improperly (metioned in OReilly's book "Mastering Regular Exprssions" by J. Friedl). One of the solutions might be "unfolding" the alternations by using the following pattern:
which is supposed to be faster than your previous one. Regards, Xicheng
In Section
Seekers of Perl Wisdom
|
|