procmail
[Top] [All Lists]

Re: cleaning up with regexes

1997-06-17 11:24:00
Timothy Luoma wants to combine these three recipes:

| :0Efhw
| * ^From 
owner-nsfip-homebrew(_at_)mmg2\(_dot_)im\(_dot_)med\(_dot_)umich\(_dot_)edu
| | formail -I "X-Prefiled: nsfip"  -I"X-Autoreply: no"
| 
| :0Efhw
| * ^TOnsfip-homebrew(_at_)mmg2\(_dot_)im\(_dot_)med\(_dot_)umich\(_dot_)edu
| | formail -I "X-Prefiled: nsfip"  -I"X-Autoreply: no"
| 
| :0Efhw
| * 
^TOnsfip-homebrew-outgoing(_at_)mmg2\(_dot_)im\(_dot_)med\(_dot_)umich\(_dot_)edu)
| | formail -I "X-Prefiled: nsfip"  -I"X-Autoreply: no"

That last one has a stray unmatched right parenthesis ... anyhow,

 :0Efhw
 * (^TOnsfip-homebrew(-outgoing)?|^From owner-nsfip-homebrew)@\
   mmg2\.im\.med\.umich\.edu
 | formail -I "X-Prefiled: nsfip"  -I"X-Autoreply: no"

The outer parentheses serve to alternate the two sides of the pipe symbol;
the inner parentheses group the characters of "-outgoing" together so that
the question mark (meaning "zero or one of the preceding") will apply to
the group.

Since "^TO" must appear together to be treated as a token to be expanded,
we cannot combine the carets of ^TO and ^From before the parentheses.

<Prev in Thread] Current Thread [Next in Thread>