procmail
[Top] [All Lists]

Re: Regular Expression Misunderstanding

1998-11-27 15:31:01
On Fri, 27 Nov 1998 12:27:46 -0600, Adam Bailey <adamb(_at_)tezcat(_dot_)com>
wrote:
Because you're missing your ^ on the TO_. Try:
     :0:
     * ^(From:|TO_).*someaddress
     somefolder

Um, right, but still wrong. ^TO_ is special, you have to have those
four characters exactly like that for it to work.
  Also, ^TO_.* is an oxymoron, but I can see how it's useful if you
want to mix with From: -- but then in the end you probably only want
to match on the To: header (and perhaps Cc:) and not the full set
matched by ^TO_.

    :0:
    * (^From:|^TO_)(.*\<)?someaddress\>
    somefolder

or even just

    :0:
    * ^(From|To)(.*\<)?someaddress\>
    somefolder

Hope this helps,

/* era */

And yes, ^FROM_MAILER and ^FROM_DAEMON and ^TO are also specials which
need to be put in exactly like that if you want their special meaning.

-- 
.obBotBait: It shouldn't even matter whether    <http://www.iki.fi/~era/>
I am a resident of the state of Washington. <http://members.xoom.com/procmail/>

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