[EMAIL PROTECTED] wrote:
> Quoting Jason Little <[EMAIL PROTECTED]>:
> 
> > I just wrote my own rule
> > Called it wrotesub.cf
> > 
> > header          LR_WROTE_SUB                    Subject =~
> > /\bwrote\b\:/i describe        LR_WROTE_SUB                   
> > Wrote in Subject 
> > score           LR_WROTE_SUB                    3.0
> 
> Hmm the 'wrote' spams we get are more like /\bwrote:\b/i

The \b after "wrote" is irrelevant in the first example and wrong in the
second.

\b requires that there is a letter or underscore on one side and something
else on the other side.

In the first example (/\bwrote\b:/i), both sides of the \b are specified and
so it is not needed.

I the second example (/\bwrote:\b/i), you are specifying that the colon must
be followed by a word character (letter or underscore).  This does not allow
a space following the colon.

The correct regex would be:

        Subject =~ /\bwrote:/i

You want a word break at the beginning, but you really don't care what comes
after the colon.

-- 
Bowie

Reply via email to