---------- Forwarded message ----------
From: Peng Yu <[EMAIL PROTECTED]>
Date: Oct 18, 2006 9:19 PM
Subject: Re: Match something that not in the pattern
To: Bill McCarthy <[EMAIL PROTECTED]>


On 10/18/06, Bill McCarthy <[EMAIL PROTECTED]> wrote:
On Wed 18-Oct-06 8:03pm -0600, Peng Yu wrote:

> I have the following file segments. I want to concatenate all the
> lines with their next lines, except that it ends with "}}". I want to
> use the pattern "\(}}\)[EMAIL PROTECTED]". It seems not working.
>
> Would you please help me to figure out how to match the lineend without "}}"?

You're fairly close.  Assuming you visually marked those
lines, this solution is magic:

    '<,'>s/\%(}}\)\@<!\n

but this solution is very magic:

    '<,'>s/\v%(}})@<!\n

:h /\@<!
:h /\v


Could you please explain what these commands mean?

Thanks,
Peng

Reply via email to