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

Re: Quoting of parentheses in regular expressions



=- Lars Hecking wrote on Thu 23.Jul'09 at 12:19:53 +0100 -=

> Rocco Rutte writes:
> > * Lars Hecking wrote:
> > > The subject line starts with "RC(ci): [string]". Problem is, I
> > > cannot get any combination of "'\ to recognise the parentheses
> > > and square brackets as non-special. E.g. neither of
> > 
> > I think you need to double-escape the brackets:
> > 
> >   save-hook '~s RC\\(ci\\):\ \\[string\\]' +foo
> > 
> > as upon parsing it, mutt strips one level of \.
> 
>  That's it! Thanks! Plus the double quotes ...
> 
>  save-hook '~s "RC\\(ci\\): \\[string\\]"' =bla

See also 'PatternQuoting' on the mutt-wiki.

-- 
© Rado S. -- You must provide YOUR effort for your goal!
EVERY effort counts: at least to show your attitude.
You're responsible for ALL you do: you get what you give.