Regex (MatchText) speed
Brian Yennie
briany at qldlearning.com
Thu Jun 24 01:49:11 EDT 2004
Troy,
My 2 cents- it totally depends on what kind of RegEx you're ending up
with.
RegEx buys you power for expressing complex rules. A hand crafted
solution will almost always run faster, it's just a matter of whether
you can afford to write new code for every case instead of just
accumulating expressions and letting the RegEx engine do the work.
For example, if I wanted to remove HTML tags from text, I'd probably
use something hand-crafted for speed. If I wanted to verify a valid URL
in a strict standards-compliant sense, I'd probably drop in the nasty
RegEx because I wouldn't trust my hand-crafted code to catch everything
without a ton of effort.
- Brian
More information about the use-livecode
mailing list