in reply to Re^4: Suggestion for regular expression speed improvement.
in thread Suggestion for regular expression speed improvement.
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
$world=~s/war/peace/g
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Suggestion for regular expression speed improvement.
by moritz (Cardinal) on Jun 15, 2009 at 14:34 UTC | |
Re^6: Suggestion for regular expression speed improvement.
by bala.linux (Novice) on Jun 15, 2009 at 14:46 UTC | |
by demerphq (Chancellor) on Jun 15, 2009 at 17:10 UTC | |
by bala.linux (Novice) on Jun 15, 2009 at 18:11 UTC | |
by demerphq (Chancellor) on Jun 15, 2009 at 19:38 UTC |
In Section
Seekers of Perl Wisdom