I'm probably missing something simple, but I can't figure out how to
strip arbitrary text off the end of a variable.
Personally, I'd probably use sed. Perhaps something like:
:0:
*
^List-Unsubscribe:.*leave-isp-\/(_dot_)*(_at_)(_dot_)*isp-lists(_dot_)com
* MATCH ?? ^\/[^(_at_)]+
{
NAME=`echo "$MATCH" | sed 's/-[^-]\+$//'`
:0:
ISP-$NAME
}
I can't think of a pure procmail solution off the top of my head.
Martin
--
Martin McCarthy /</ PGP key available
`Procmail Companion' \>\ http://www.ancient-scotland.co.uk
Addison Wesley /</ http://www.ehabitat.demon.co.uk
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail