[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 <6a41f4ac-f7e7-49f1-a593-501d82d4c733@googlegroups.com>,
gnuist006@gmail.com 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, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***