procmail
[Top] [All Lists]

regexp to match x BEFORE y

2002-02-12 14:32:24
I appoligize if this question has already been asked. I scanned the FAQ
and mailing list archives before posting this message and wasn't able to
identify an answer to my dilema.

I run numerous opt-in mailing lists, and quite often have users who just
click reply and type "remove" or "unsubscribe" in the body of the message
and then send the message back to me. Normally this would be easy to catch
with procmail, simply scanning the body for "remove" or "unsubscribe". My
problem arises from the fact that most of the customers who reply to the
emails leave the original message in the reply, and the original message
contains the words "remove" and "unsubscribe".

So, I want to match the word "remove" anywhere in the body BEFORE the text
"original message". I created the regexp below to handle this, but it is
not working for me. I realize that this is probably because my regexp is
ugly, so, any help fixing it would be greatly appreciated.

:0B:
* .*remove.*.$.*original message.*
/home/foo/mail/remove

Thanks,
J-Dog

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>