[Mailman-Users] Filter to discard facebook invitations

Mark Sapiro mark at msapiro.net
Sun Apr 4 17:34:16 CEST 2010


John List wrote:

>Why doesn't the following discard_these_nonmembers filter work for 
>facebook invitations:
>
>^[!@]*@facebookmail.com


Because while it is a valid Python regexp
<http://docs.python.org/library/re.html>, it doesn't say what you mean.

The correct way to say what I think you mean by that is

  ^[^@]*@facebookmail.com

I.e. [^@] matches anything which is not '@'; [!@] matches just '!' or
'@'.

However, I would use

  ^.*[@.]facebookmail\.com$

to match any address in the facebookmail.com domain or a sub-domain or

  ^.*@facebookmail\.com$

to match addresses in only the facebookmail.com domain.





-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan



More information about the Mailman-Users mailing list