Thanks for the help, to respond... > Life will be much easier for this kind of task if you upgrade to > Mailman 2.1.x; 2.1.6 is current.
Agreed - I don't administer the server, but understand we're waiting for the new stable release of Debian (any day now). > Really, you should invest in Jeffrey Friedl's book, _Mastering Regular > Expressions_. I'm sure there are many on-line tutorials, too. This > is not the channel for questions that arise because you don't > understand how to construct a regular expression. For now, try > > subject:[ \t]*\[SPAM > subject:[ \t]*\\[SPAM Neither of these worked. I'll take a look at that book though, ta. Also I understand that this isn't a regexp help list, and sorry if I've wasted some bandwidth. However, in my defence, prior to posting I did look at quite a few online tutorials, and then tested out a few expressions on some text files. When I found a few expressions that worked I used these in mailman(without luck obviously). Following Stephen's suggestions, I've tried a few more. What I did was place the following lines (among others) in a text file. As I'm not sure exactly how the subject header is formatted, I wanted something that would find all off the following: subject: [SPAM 07.49] Stop your computer from crashing subject: [SPAM 07.49] Stop your computer from crashing subject:[SPAM 07.49] Stop your computer from crashing Subject: [SPAM 07.49] Stop your computer from crashing Subject: [SPAM 07.49] Stop your computer from crashing Subject:[SPAM 07.49] Stop your computer from crashing One line has a tab b/w ":" and "[SPAM", another a space and the third nothing. The other thing I wasn't sure about was if the first letter of subject is uppper case or not. The expression I found that matched all 6 lines (using grep) was: [sS]ubject:.*\[SPAM I also used the find function in KATE, and found that it preferred: [sS]ubject:[\s]*\[SPAM (using [\t] didn't match the lines with a tab) Neither of these worked in mailman, so I tried with just upper, then lowercase 's' to start with (i.e. subject:.*\[SPAM and Subject:/* etc ). This hasn't worked either. So I guess I'm at a loss. I've got my head around regular expressions enough to find what I want in a text file, but can't get it work in Mailman. Am I dumber than I think (very possible ;->) or is there something about the way that Mailman handles regexps that I've missed? Ta, David ------------------------------------------------------ Mailman-Users mailing list Mailman-Users@python.org http://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-users/archive%40jab.org Security Policy: http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp