all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: delete non-matching lines
Date: Tue, 11 Aug 2009 16:33:49 +0200	[thread overview]
Message-ID: <7cab26ctde.fsf@pbourguignon.anevia.com> (raw)
In-Reply-To: e07af9b2-d5ea-4ce4-8f0f-69a8aaecb6d7@c14g2000yqm.googlegroups.com

Nachiket Gokhale <gokhalen@gmail.com> writes:

> How do I delete all lines starting with
>
> "ESPN"

  M-x delete-matching-lines RET ^ESPN RET

>
> And, the opposite:
>
> How do I delete all lines not starting with
>
> "ESPN"

  M-x delete-matching-lines RET ^\([^E C-q C-j ]\|E[^S C-q C-j ]\|ES[^P C-q C-j ]\|ESP[^N C-q C-j ]\) RET
 
Or perhaps just:

  M-x delete-matching-lines RET ^\([^E]\|E[^S]\|ES[^P]\|ESP[^N]\) RET

if you are lucky.



You may also use:

  C-x h M-| grep    ESPN RET

or

  C-x h M-| grep -v ESPN RET

but this is cheating.

-- 
__Pascal Bourguignon__


  parent reply	other threads:[~2009-08-11 14:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 13:59 delete non-matching lines Nachiket Gokhale
2009-08-11 14:33 ` Teemu Likonen
2009-08-11 14:33 ` Pascal J. Bourguignon [this message]
2009-08-11 15:25 ` Xah Lee
2009-08-11 18:57   ` Nachiket Gokhale
2009-08-12  5:54 ` Martin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7cab26ctde.fsf@pbourguignon.anevia.com \
    --to=pjb@informatimago.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.