* Sven Guckes ([EMAIL PROTECTED]) wrote:
> * 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.

I was talking about Mutt ;)

> 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.

Right...

> 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.

Just tested it and it doesn't work...

Jerome

-- 
+-------------------------------------------------------------------+
|               'the panorama of the city is wrong                  |
|               in fact the city seems to be gone!'                 |
|                 the clash, stop the world, 1980                   |
+-------------------------------------------------------------------+

Reply via email to