You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Kevin Peuhkurinen <ke...@hepcoe.com> on 2004/03/26 16:58:25 UTC
Re: Rules to count number of occurances w00t!
I got it to work!
Here's my rule:
full L_TEST
/(\b(best|most|more|((best|bett|bigg|larg|fast|quick)(er|est)))\b.*){3}/is
describe L_TEST Test
score L_TEST 0.01
I sent myself an email with the text:
We are the biggest!
We are the fastest!
We are the best!
And it tripped!
Notice, though, that instead of just looking for 4 occurances, I was
looking for 3. It is the "s" at the end that causes it to treat
newlines as any other character.
Al Danks wrote:
>>>From perlre manual (perldoc perlre or man perlre):
>> m Treat string as multiple lines.
>>
>>
>
>
>
>> s Treat string as single line. That is, change "." to match any
>> character whatsoever, even a newline, which normally it would not
>> match.
>>
>>
>
>Eugene,
>
>How would I modify the rule to use the m or s?
>
>full /(\b(best|most|more|((best|bett|bigg|larg|fast|quick)(er|est)))\b.*){4}/i
>
>Al
>
>
>
>
Re: Rules to count number of occurances w00t!
Posted by Al Danks <ad...@calvin.edu>.
Kevin,
Indeed you did - and you helped me discover an anomaly with my email client. We
use GroupWise. I discovered that if I composed the message in Plain Text format
the rule did not trip. If I composed it in HTML format the rule tripped just
fine.
Al
Re: Rules to count number of occurances w00t!
Posted by Al Danks <ad...@calvin.edu>.
Kevin,
After further examination of my rule I was using body - which apparently was
causing my Plain Text email to miss the rule. When I switched to full the Plain
Text composed email tripped the rule just fine.
Al