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]/

HTH                                     --Benji Fisher

Reply via email to