From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: lawrence mitchell Newsgroups: gmane.emacs.help Subject: Re: how to flush lines that do NOT include characters 'FK' Date: Thu, 07 Aug 2003 13:11:17 +0100 Organization: funfunfun Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1060259078 32156 80.91.224.253 (7 Aug 2003 12:24:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 7 Aug 2003 12:24:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 07 14:25:01 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19kjpE-0005pS-00 for ; Thu, 07 Aug 2003 14:25:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19kjgS-0003NW-BH for geh-help-gnu-emacs@m.gmane.org; Thu, 07 Aug 2003 08:15:56 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.telebyte.nl!news2.telebyte.nl!fu-berlin.de!uni-berlin.de!vegetable.demon.co.UK!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 23 Original-NNTP-Posting-Host: vegetable.demon.co.uk (80.177.16.3) Original-X-Trace: news.uni-berlin.de 1060258277 30075317 80.177.16.3 (16 [97657]) X-No-Yes: No Mail-Copies-To: nobody User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 Cancel-Lock: sha1:XG6xGJUz0GLVO+XCHMj6pmpGQlo= Original-Xref: shelby.stanford.edu gnu.emacs.help:115717 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11635 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11635 Roland Reichenberg wrote: > in my buffer, I want to flush all lines that do NOT contain the letters "FK" [...] > Any suggestions for a REGEXP? > I have tried the following: > M-x flush-lines [^FK] Writing regexps for matching "not something" is generally quite difficult, especially if "something" is more than a single character. Instead, I suggest you look to try and keep all lines containing the letters "FK". Thankfully such a function already exists. So you can do: M-x keep-lines RET FK RET and not have to worry about nasty regexps :) -- lawrence mitchell