procmail
[Top] [All Lists]

Re: Split (\/) regex with optional component on left

2009-12-17 01:31:51
* David W. Tamkin <dattier(_at_)panix(_dot_)com> [2009-12-16 23:35 -0600]:
James Michael Fultz wrote:
:0
* ^(List-(Id|Post)|X-(Mailing-)?List):.*<(mailto:)?\/[^(_at_)(_dot_)]+
ML/$MATCH/

So far it works for all except one of the intended matches.  Headers
such as the following:

List-Post: <mailto:listname(_at_)example(_dot_)com>

...result in delivery to 'ML/mailto:listname' rather than 'ML/listname'.
I understand that using '\/' causes matching on the left to be stingy
which I suppose is causing the result I am getting.  Is a separate
recipe for List-Post the only viable option here?

Hmm.

 :0
 * ^(List-(Id|Post)|X-(Mailing-)?List):.*<\/[^(_at_)(_dot_)]+
 * 1^0 MATCH ?? ^^mailto:\/.+
 * 1^0
 ML/$MATCH/

Hmm.  I think that I understand how this works.  I may go with
listname_id as a solution, but nice to know of another way as well.
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)de
http://mailman.rwth-aachen.de/mailman/listinfo/procmail