On 6/12/06, Benji Fisher <[EMAIL PROTECTED]> wrote:
On Mon, Jun 12, 2006 at 02:42:18PM +0000, Yakov Lerner wrote: > I need to match lines using g// (not v//); those lines having > 'foo' and NOT having /)\s*;/ anywhere in the line. How do I write such > regex. > > I think I need to use \& > ^.*foo\&^XXX$ > and then put, in place of XXX, the pattern that > matches anything not containing /)\s*;/. How do I express it in vim. > > Yakov > > I'd write \([^)]\|)\S\|)\s*[^;]\) failing other things.How about preceding 'foo' with '\(...\)\@<!' and following it with '\(...\)[EMAIL PROTECTED] as in /\()\s*;.*\)\@<!foo\(.*)\s*;\)[EMAIL PROTECTED]/
Benji, Im not sure the post-foo part works. I think it will give the false match whenever it something after foo that does not match )\s*;. This is not what I wanted. Yakov
