procmail
[Top] [All Lists]

Re: string parsing

1999-12-04 14:41:17
Ruud asked,

| I meant to squeeze another few lines out of your recipe:
| when you leave the '@' at the end of MATCH, etc.

Never.  It's something like this:

 foldername=$LISTNAME
 tag="\[$LISTNAME]"
 :0
 * $ listnamestring ??  (^^|!)$LISTNAME%\/[^!(_at_)]+
 {
  foldername=$MATCH
  
  :0 # if there's no @ after $foldername, $tag is not changed
  * $ listnamestring ?? %$foldername(_at_)\/[^!]+
  { tag=$MATCH }
 }