Tim Chase wrote:
> On 2022-09-02 19:45, Sam Kuper wrote:
>> Could you not prepend your EXPR with something like this?
>> 
>>     `^(Delivered|Envelope)-To:\ `
> 
> Ah, so the pattern for matching ~h includes the header-name then
> and the regex can match against that? That should work.
> 
> However, when I tried this
> 
>  color index reverse brightblack black "~h ^(delivered|envelope)-to:\ 
> +[0-9a-f]{5,}[.][0-9a-f]{5,}@mydomain.com)$"
> 
> (tried with and without the backslash escaping the space)
> 
> Mutt complains
> 
>  Error in [my muttrc]: '^(delivered': parentheses not balanced
> 
> which looks like the "|" is getting higher precedence than the
> parens.

Quote the pattern, as you would if using ~h in a limit
statement:

  color index reverse brightblack black "~h '^(delivered|envelope)-to: 
+[0-9a-f]{5,}[.][0-9a-f]{5,}@mydomain.com)$'"

There shouldn't be any need to escape the space in the
pattern.

-- 
Todd

Reply via email to