Perl Monk, Perl Meditation | |
PerlMonks |
Re^5: Suggestion for regular expression speed improvement.by demerphq (Chancellor) |
on Jun 15, 2009 at 14:25 UTC ( [id://771666]=note: print w/replies, xml ) | Need Help?? |
You need to think out of the box. Make your system handle the various cases. A regex, a split, an unpack, maybe even an xml parser.... Definitely doing it the way you are is wrong. If you are really insistent on ignoring our advice (unwise really), then at least use inversion and you might want to investigate the (?>...) construct "atomic matching". As well as adding anchors to your pattern.
--- $world=~s/war/peace/g
In Section
Seekers of Perl Wisdom
|
|