On Sun, 22 Dec 2002, Paul Chvostek wrote:
That still leaves you with the problem of trimming the "-help" off the
other end:
:0
* LISTNAME ?? -help$
* LISTNAME ?? ^\/.+-
* MATCH ?? ^\/.+[^-]
{
LISTNAME="$MATCH"
}
But that won't work on lists with hyphenated names.
Yes, it will. (I tried it.) Matching is non-greedy to the left of \/,
but is greedy to the right. Partial verbose log output on my test input:
procmail: Assigning "LISTNAME=horde-imp-help"
procmail: Match on "-help$"
procmail: Assigning "MATCH="
procmail: Matched "horde-imp-"
procmail: Match on "^\/.+-"
procmail: Matched "horde-imp"
procmail: Match on "^\/.+[^-]"
procmail: Assigning "LISTNAME=horde-imp"
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail