Re: Grep search replace escaping question

2018-08-15 Thread Andrew Stewart
> But it is looking more complicate your "magic"! Two escapes more! As far as I know the idea is that "very magic" is typical regex syntax, whereas "magic" is something invented for Vim so that patterns which match code require less escaping. -- -- You received this message from the "vim_m

Re: Grep search replace escaping question

2018-08-15 Thread mstep.germany via vim_mac
On Wednesday, 15 August 2018 15:32:25 UTC+2, Andrew Stewart wrote: > @Andrew > > What I have to escape in a nagative construct like > > {([^}]+)} > > > > Just replace the \w with [^}] > > > So with default "magic": > > > {\([^}]\+\)} > > > With "very magic": > > > \{([^}]+)\} > > >

Re: Grep search replace escaping question

2018-08-15 Thread Andrew Stewart
> @Andrew > > What I have to escape in a nagative construct like > > {([^}]+)} > Just replace the \w with [^}] So with default "magic": {\([^}]\+\)} With "very magic": \{([^}]+)\} Yours, Andrew Stewart -- -- You received this message from the "vim_mac" maillist. Do not top-post! Type yo

Re: Grep search replace escaping question

2018-08-15 Thread mstep.germany via vim_mac
Thank you Andrew Stewart and J. Scott Franko! I will read :help magic Thank you! @Andrew What I have to escape in a nagative construct like {([^}]+)} That means: search for an opening curly { match all what is NOT a curly closing } and at the end an closing curly } Thank you for you

Re: Grep search replace escaping question

2018-08-15 Thread Andrew Stewart
> I need to replace all occurrences in a LaTeX-file of > > \textcolor{LRed}{bar} > > with: > > bar > > That means I need only to remove this exact LaTeX code around "bar". I don't > know what to escape in my grep pattern. I tried nearly everything to escape : > ( ) [ ] \ ... > > But nothi

Grep search replace escaping question

2018-08-15 Thread mstep.germany via vim_mac
Hello all! I am pretty new to vim. I am pretty experimented in grep. So bare with me. I need to replace all occurrences in a LaTeX-file of \textcolor{LRed}{bar} with: bar That means I need only to remove this exact LaTeX code around "bar". I don't know what to escape in my grep pattern.