Chris Santerre <[EMAIL PROTECTED]> writes:
> If I work the regex even further so it reads:
>
> (?:domain1|domain2|domain3)\.com
>
> rather then:
>
> (?:domain1\.com|domain2\.com|domain3\.com)
>
> Will it run even faster? Less memory? Or is it a tradeoff between the two? 

In fact, looking at my copy of the first editin of Jeff Friedl's
_Mastering Regular Expressions_ (the second edition might have more),
it *might* make more sense, if possible, to break the regexp up like:

d(?:omain1|omain2|omain3)\.com

Page 154 talks about first character discrimination, and suggests that
NFA-based engines like Perl and TCL, are not good with figuring this
out for themselves, even in simple cases.

He also suggests using the -Dr switch to debug this some.

Seriously, if you want to try and make this stuff more efficient,
_MRE_ is pretty much the reference.

Mike
-- 
She looks like Eve Marie Saint in On The Waterfront -- Lloyd Cole


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to