<<< Date Index >>>     <<< Thread Index >>>

Re: send-hook RE question



* On 2005.08.25, in <20050825202328.GA30015@xxxxxxxxxxx>,
*       "Chris Green" <chris@xxxxxxxxxxx> wrote:
> I'm trying to set up a send-hook RE that will match a number of
> strings using the | character.  I.e. I have a send-hook like:-
> 
> send-hook "~t adr1|adr2|adr3|adr4" unmy_hdr reply
> 
> However all I get is:-
> 
> Error in /home/chris/.mutt/muttrc, line 86: error in pattern at: 
> adr1|adr2|adr3|adr4
> 
> Can I not use this sort of RE in a send-hook?

The '|' is significant at a higher level of processing, for disjunctive
conjunctions (i.e., logical or).  To make it meaningful within a regex
instead of being an implicit regex separator, escape it:

    send-hook "~t adr1\|adr2\|adr3\|adr4" unmy_hdr reply

-- 
 -D.    dgc@xxxxxxxxxxxx        NSIT    University of Chicago