Bill Jonas on Wed, 10 Jan 2001 09:37:25 -0500

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] procmail question

On Wed, Jan 10, 2001 at 05:32:54AM -0500, gabriel rosenkoetter wrote:
> I wish, as I have before that regexps worked like this:
> :0
> * ^Cc: .*@.*\..*, &1@&2\.&3 [...]
> spam

I *think* you could do something like this:

* ^Cc:  \([^ ,]*\).*\1.*\1.*\1.*\1.*\1

I'm not sure if it'll work with procmail, though.  What the above is doing
(or would do in vi):  After the header's label, match any character except
a space or a comma any number of times and "remember" what you matched
(the backslashes and parentheses).  Match that five more times, separated
by any number of any character.

Well, I just tested it and it didn't work.  But I have a feeling that the
answer is quite similar to that.  Have you looked at procmailex(5),
procmailrc(5), and friends?  (Well, I guess you have.)  Maybe there's some
solution in there.

Bill Jonas                | "In contrast to the What You See Is What You        |  Get (WYSIWYG) philosophy, UNIX is the You |  Asked For It, You Got It operating system."    |  --Scott Lee, as quoted by Lamb and Robbins

Philadelphia Linux Users Group       -
General Discussion  -