procmail
[Top] [All Lists]

Re: Getting rid of Re Re Re

2001-04-03 22:39:09
From: "Timothy J. Luoma" <tjlists(_at_)bigfoot(_dot_)com>
Date: Tue, 03 Apr 2001 11:44:14 -0400


Someone, a long time ago, had a great regex for getting rid of:

      Subject: Re: Re: RE: Re: Re2:

Hey, Tim, you can get rid of the 'Re:' and 'RE:' with the same thing
that you gave to me using sed:

via shell:
   echo "Re: Re: RE: Rex Reaps Red Rebels" | sed s/.R\[eE\]://g
   Re: Rex Reaps Red Rebels

thus:
   SUBJECT=`formail -xSubject: |sed s/.R\[eE\]://g
   :0fhw
   |formail -I"Subject: $SUBJECT"

and all that other nonsense including a trailing '-reply' (which I guess was
just a brief annoyance on the 'net but I live in dread fear of its return!!!)


Someone else posted a similar one for getting rid of :

      Subject: FWD: Fw: FW:

   SUBJECT=`formail -xSubject: |sed s/.F\[wW\]://g

I suppose you could use another pipe to get rid of the 'Re2's and 'FWD's
_______________________________________________
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>