[TriLUG] Negative search in Vi

Craig Taylor ctalkobt at gmail.com
Sat Apr 12 17:41:16 EDT 2008


Negate your regular expression search, eg: for lines that don't have 'dog'
use :

/^.*[^d][^o][^g].*$

disclaimer: this has not been tested - I believe it should work 'tho)

- Craig Taylor



On Sat, Apr 12, 2008 at 8:35 AM, Rodney Radford <rradford at mindspring.com>
wrote:

>
> How about searching for the pattern with highlighting enabled, then
> manually scanning the file for all lines that are not highlighted?  It is
> not as automatic as putting you on the correct line, but at least it makes
> the manual process of detecting the missing pattern much easier.
>
> -----Original Message-----
> >From: Scott Lambdin <lopaki at gmail.com>
> >Sent: Apr 11, 2008 4:00 PM
> >To: trilug at trilug.org
> >Subject: [TriLUG] Negative search in Vi
> >
> >Is there a way to search for the next line without a certain pattern?
>  I'm
> >not figuring it out.
> >
> >--Scott
> >
> >--
> >CILCIL
> >--
> >TriLUG mailing list        :
> http://www.trilug.org/mailman/listinfo/trilug
> >TriLUG Organizational FAQ  : http://trilug.org/faq/
> >TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>
> --
> TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ  : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



More information about the TriLUG mailing list