* Jerome De Greef <[EMAIL PROTECTED]> [2002-03-16 09:25]:
> > % send-hook  '~t .*' 'my_hdr From: JDG <[EMAIL PROTECTED]>'
> > % send-hook !'~t .*' 'my_hdr From: JDG <[EMAIL PROTECTED]>'
> > Does this work, or do you think it should?
> > I'd expect that you'd need "..*" in your
> > patterns instead of just ".*" 'cuz the former is
> > "one character plus zero or more characters"
> > while the latter still accepts none.
> >
> > Perhaps it works simply because there is a To:
> > header to check versus one being absent; in that
> > case, you can probably leave off the asterisk.
>
> It works as is. But you're right, I thought .* was
> doing what ..* does.  I'm not that good with regular
> expressions.  BTW, doesn't ..* do the same as .+ ?

"it depends".  really - it all depends on
the language you currently have available.

The operator '+' might not be available at all.
But the usual workaround for "1 or more times
of X" is to use "XX*".

Anyway, if you simply need a default rule for
all addresses then you need to check for just
only  character in the address, right?
Checking for more is simply superfluous.

Also, the pattern in the "send-hook" command
is applied to the addresses in TO/CC, anyway,
so all you need is to give part of the address:

 send-hook   . 'my_hdr From: JDG <[EMAIL PROTECTED]>'
 send-hook ! . 'my_hdr From: JDG <[EMAIL PROTECTED]>'

this should work.  untested, though.

Sven  [who always sends with a replyable address]

-- 
Sven Guckes          [EMAIL PROTECTED]
MUTT SETUP TIPS:     http://www.math.fu-berlin.de/~guckes/mutt/setup.html
MUTT HOOKS EXAMPLE:  send-hook .      'set signature="~/.sig.mine"'
                     send-hook guckes 'set signature=""'

Reply via email to