Dennis Putnam writes:

 > Thanks. So far it is looking good but I made one small change:
 > 
 > ^from:\s*(<?no-reply|.*<no-reply|.*<noreply)@
 > 
 > I hope I did it right.

That does what you want it to do, and no more.

You can express it more compactly with

    ^from:\s*(<?no-reply|.*<no-?reply)@

which might be a little faster, too (that depends on exactly how the
regular expression matcher is implemented).

You might also want to add a ? after the first hyphen, as well, so
that you can match

    From: noreply@annoying-vendor.example

as well as

    From: no-reply@annoying-vendor.example

Regards,
Steve
------------------------------------------------------
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
    https://mail.python.org/archives/list/mailman-users@python.org/

Reply via email to