help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to find lines not matching a certain pattern - ie grep -v


From: Barry Margolin
Subject: Re: How to find lines not matching a certain pattern - ie grep -v
Date: Sun, 22 Feb 2015 22:23:22 -0500
User-agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)

In article <address@hidden>,
 address@hidden wrote:

> Hi All,
> 
> Once in a while I have to do something to lines that do not have a certain 
> string or set of strings in them. I know how to find lines with a string. I 
> also know how to find lines with a set of strings, ie by using the regexp
> 
> string1\|string2\| ....
> 
> But I dont know how to find strings that do not have the string or strings.

You could copy the buffer to another buffer, then use M-x flush-lines to 
delete the matching lines. What's left are the non-matching lines.

-- 
Barry Margolin, address@hidden
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***


reply via email to

[Prev in Thread] Current Thread [Next in Thread]