Re: Match something that not in the pattern

2006-10-19 Thread Bill McCarthy
On Thu 19-Oct-06 9:26am -0600, Charles E Campbell Jr wrote: > So, to do what you ask with LogiPat's result: > > :g/^\%(\%(}}$\)[EMAIL PROTECTED])*$/j Please see my response to Tony Mechelynck. Your solution changes the text of Peng Yu's example to 5 lines. As I understand his goal, the correct

Re: Match something that not in the pattern

2006-10-19 Thread Charles E Campbell Jr
Peng Yu wrote: Hi, 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 "

Re: Match something that not in the pattern

2006-10-19 Thread Bill McCarthy
On Thu 19-Oct-06 2:28am -0600, you wrote: > Bill McCarthy wrote: >> On Wed 18-Oct-06 10:24pm -0600, A.J.Mechelynck wrote: >> >>> Peng Yu wrote: Hi, I have the following file segments. I want to concatenate all the lines with their next lines, except that it ends with "}}". I w

Re: Match something that not in the pattern

2006-10-19 Thread A.J.Mechelynck
Bill McCarthy wrote: On Thu 19-Oct-06 2:28am -0600, you wrote: Bill McCarthy wrote: On Wed 18-Oct-06 10:24pm -0600, A.J.Mechelynck wrote: Peng Yu wrote: Hi, I have the following file segments. I want to concatenate all the lines with their next lines, except that it ends with "}}". I want

Re: Match something that not in the pattern

2006-10-19 Thread Bill McCarthy
On Thu 19-Oct-06 3:08am -0600, you wrote: > Hadn't thought of that. So IIUC our final try is > 1,$-1v/}}$/ > \ while getline(".") !~ '}}$' > \ && line(".") != line ("$") > \ | join > \ | endwhile

Re: Match something that not in the pattern

2006-10-19 Thread A.J.Mechelynck
Bill McCarthy wrote: On Wed 18-Oct-06 10:24pm -0600, A.J.Mechelynck wrote: Peng Yu wrote: Hi, 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

Re: Match something that not in the pattern

2006-10-19 Thread Bill McCarthy
On Wed 18-Oct-06 10:24pm -0600, A.J.Mechelynck wrote: > Peng Yu wrote: >> Hi, >> >> 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. >> >>

Re: Match something that not in the pattern

2006-10-18 Thread Bill McCarthy
On Wed 18-Oct-06 9:20pm -0600, Peng Yu wrote: > On 10/18/06, Bill McCarthy <[EMAIL PROTECTED]> wrote: >> You're fairly close. Assuming you visually marked those >> lines, this solution is magic: >> >> '<,'>s/\%(}}\)\@> >> but this solution is very magic: >> >> '<,'>s/\v%(}})@> >> :h /\@>

Re: Match something that not in the pattern

2006-10-18 Thread A.J.Mechelynck
Peng Yu wrote: Hi, 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 "}

Re: Match something that not in the pattern

2006-10-18 Thread Peter Hodge
--- Peng Yu <[EMAIL PROTECTED]> wrote: > Hi, > > 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. [EMAIL PROTECTED] is the look-ahead asser

Fwd: Match something that not in the pattern

2006-10-18 Thread Peng Yu
-- 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 -0

Re: Match something that not in the pattern

2006-10-18 Thread Bill McCarthy
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 ho

Re: Match something that not in the pattern

2006-10-18 Thread Anupam Srivastava
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peng Yu wrote: > Hi, > > 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

Match something that not in the pattern

2006-10-18 Thread Peng Yu
Hi, 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 "}}"? Thanks, Peng