Procmail recipe: extracting matched text
David Gibson
david at gibson.dropbear.id.au
Tue Dec 10 11:42:53 EST 2002
On Tue, Dec 10, 2002 at 11:33:50AM +1100, Michael Still wrote:
>
> Hey,
>
> now that we're talking about regexps, I am having some troubles finding
> documentation which covers the text matching in procmail.
>
> Specifically, I have a rule like:
>
> :0:
> * List-Id.*<([^.]*).*>
> $1
>
> Which should match any mailman mailling list, and then put the mail into a
> folder named after the first portion of the list id.
>
> However, $1 is clearly not the right way of getting to the text wrapped in
> ()'s.
>
> Can I please have a hint what is?
Erm.. are you sure that procmail's notion of regular expressions
actually allows this at all?
--
David Gibson | For every complex problem there is a
david at gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
More information about the linux
mailing list