[Mailman-Users] Help with regular expression filters

Malcolm Austen malcolm.austen at weald.org.uk
Wed Feb 4 12:38:44 CET 2015

On Tue, 03 Feb 2015 21:43:09 -0000, Mark Sapiro <mark at msapiro.net> wrote:
> In Mailman, with Python regexps
> <https://docs.python.org/2/library/re.html>, I would use
> ^Subject:.*\Wtest\W
> \W matches any 'non-word' character and is equivalent to [^a-zA-Z0-9_],
> i.e. anything including new-line which is not a letter, digit or  
> underscore.

I trap with - ^subject:.*\btest.* - accepting \W is the better option, I  
tail it with .* as I want to catch 'testing' as well as 'test' :-)

I also have traps - ^subject:.*virus.* - on 'virus', 'spam' and 'digest'  

What I would really like is a (simple) way to trap the absence of a  
subject header but I think, we can (understandably) only trap on the  
content of something that is present :-(

= Malcolm.

Malcolm Austen <malcolm.austen at weald.org.uk>
GENUKI trustee <genuki at weald.org.uk>
Pedigree User Group <chairman at pugweb.org.uk>
Oxfordshire FHS <webmaster at ofhs.org.uk>
FFHS Communications Officer <communications at ffhs.org.uk>

More information about the Mailman-Users mailing list