Character classes in a spamfilter re

These are old archives. They are kept for historic purposes only.
Post Reply

Character classes in a spamfilter re

Post by mr » Tue Dec 14, 2004 6:17 pm

I have an re: '[^[:space:][:print:]]' which I would like to use to block all messages that
have non-ascii or control secquences in them. In a small sample program it works
like a charm, but if I use it as a spamfilter:

/spamfilter + cp block 0 Spam [^[:space:][:print:]]

every message gets blocked:
... matches filter '[^[:space:][:print:]]': [PRIVMSG #room5: '--how do you do that???'] [Spam]

In the sample prog. I use

regcomp ( &re1, "[^[:space:][:print:]", REG_EXTENDED|REG_ICASE|REG_NOSUB ),

same as unreal but get different results.

Anyone know why the difference?


Post Reply