On Sun, 5 Nov 2000, Mark Shaw wrote:
ms> Hello,
ms>
ms> I think I've seen this on the list recently, but unfortunately
ms> didn't save the traffic....
ms>
ms> I want to strip off and discard a leading string from the subject
ms> line of certain incoming email messages. Specifically, something
ms> like
ms>
ms> Subject: [Zonelink] Miraflores locks camera
ms>
ms> should be delivered as
ms>
ms> Subject: Miraflores locks camera
ms>
ms> Here's what I've come up with:
ms>
ms> :0 Hf
ms> * ^Subject: \[Zonelink\](.*)
ms> | formail -b -f -I "Subject: $1"
ms>
What your actually looking for is the \/ (forward and backslash) switch,
which will save everything following it to the parameter $MATCH, try
something like the following
:0f
* ^Subject:.*\[Zonelink\][ ]*\/[^ ].*
| formail -bfi "Subject: $MATCH"
ms> What I get is blank subject lines, so obviously I can't pass the
ms> second part of the match forward as a variable the way I think I can.
ms>
ms> Any help? Thanks!
ms>
ms>
--
S.Toms - tomas(_at_)primenet(_dot_)com - www.primenet.com/~tomas
SuSE Linux v7.0+ - Kernel 2.2.17
In West Union, Ohio, No married man can go flying without his spouse
along at any time, unless he has been married for more than 12 months.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail