You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Nigel Frankcom <ni...@blue-canoe.net> on 2007/02/26 16:49:01 UTC
Rule Regex Question.
Hi All,
Can anyone tell me if I need to escape the characters within the
square braces in the following?
body NF_REM_CHAR1 /remove [*%!+`"£$%^&()_-=#~]/i
score NF_REM_CHAR1 4.0
describe NF_REM_CHAR1 remove chars for URL spams
TIA
Nigel
Re: Rule Regex Question.
Posted by "John D. Hardin" <jh...@impsec.org>.
On Mon, 26 Feb 2007, Nigel Frankcom wrote:
> Can anyone tell me if I need to escape the characters within the
> square braces in the following?
>
> body NF_REM_CHAR1 /remove [*%!+`"£$%^&()_-=#~]/i
A dash indicates a range (e.g. a-z) - if you need that, it's safest to
put it as the first character in the set. Right now you're specifying
"any character between _ and =, inclusive".
The ^ would have significance if it was first, but it's not.
You don't have a closing square bracket, which is the third one to
worry about.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jhardin@impsec.org FALaholic #11174 pgpk -a jhardin@impsec.org
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Microsoft is not a standards body.
-----------------------------------------------------------------------
15 days until Albert Einstein's 128th Birthday