procmail
[Top] [All Lists]

Re: Question on $MATCH

2002-08-24 06:24:44
To determine a folder name from a bracketed word in the subject line,
parv recommended:

:0
* ^Subject:[  ]*\[\/[^]]\]
{
  :0:
  * MATCH  ??  ()[^]]
  IN-${MATCH}
}

in the "* Subject:", first $MATCH is set to text matched by
"[^]]\]".  later, the last ']' is removed by matching only "[^]]".

You'd have to use \/ for that again, I guess you just forgot. But why
include the closing bracket (which doesn't need escaping, by the way)
in MATCH at all? Simply omit it in the first line already. Oh yeah,
and the bracketed word is likely to have more than just one letter:

:0:
* ^Subject:[    ]*\[\/[^]]+
IN-$MATCH

/HW
_______________________________________________
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>