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.

May I suggest that you try LogiPat out:
 http://vim.sourceforge.net/scripts/script.php?script_id=1290
or at
 http://mysite.verizon.net/astronaut/vim/index.html#VimFuncs
 (see "LogiPat")

(as always, my website has the most up-to-date version)

In this case,   :echo LogiPat('"foo" & !")\s*;') yields

 \%(.*foo.*\&^\%(\%()\s*;\)[EMAIL PROTECTED])*$\)

Regards,
Chip Campbell

Reply via email to