Re: replace command

2007-03-20 Thread Tim Chase
I want to know a command for this: a word start with 123 but NOT followed by 45, such as 12346 12357 are match, only 12345 not match. The regexp you're looking for would be something like \123\(45\)[EMAIL PROTECTED] That breaks down as \ the beginning of a word 123 the

RE: replace command

2007-03-20 Thread Timothy Adams
/123\([^4]\|4[^5]\)/ Keep in mind this would match 123ab As well. *tim* -Original Message- From: Bin Chen [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 20, 2007 9:29 AM To: Vim ML Subject: replace command I want to know a command for this: a word start with 123 but NOT followed

Re: replace command

2007-03-20 Thread Tom Whittock
/123\(45\)[EMAIL PROTECTED] add \w* to the end of the pattern to include 46 and 57 in the search result, to match to the end of the word, and add \ to the beginning of the pattern to match for 123 only at the beginning of a word. Cheers. On 20/03/07, Bin Chen [EMAIL PROTECTED] wrote: I want