Friday, January 25, 2013

Re: does vi has a funtion like "grep -v"?

On Fri, Jan 25, 2013 at 10:21 AM, skyworld <chenyong20000@gmail.com> wrote:
Hi,

does vi has a fuction like "grep -v"? I always found I need to seach
within the file with those lines which exclue specific strings.
Thanks.

Searching in vim is done with regular expressions, so I believe this is possible.  For example, to search for lines with do not include "string"

    /^\(\(.*string.*\)\@!.\)*$

See here:



--
Aaron Webster

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
 
 
 

No comments: