Paul Douglas Franklin of Yakima UGM wrote:
Can you point me to a good regex tutorial? The one I have found has given me a lot of good starting stuff, but it doesn't mention the ?:, and I'd like to learn more.
?: is a Perl extension that disables generating a back reference.. normally anything in () can be re-referenced with \1 \2, etc depending on which set of ()'s it is.

So /(a|b)\1/ would match aa and bb but not ab.

But if you don't intend to use a back reference, storing it is just wasting memory.

As for regex references, there's several in the wiki article on rule writing. You'll also find many of the basic constructs used in SA rules explained in this article:

http://wiki.apache.org/spamassassin/WritingRules

Disclaimer: I wrote much of the text here, so I am not unbiased...

Reply via email to