all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: Search and replace
Date: Fri, 13 Jun 2008 23:13:59 -0400	[thread overview]
Message-ID: <barmar-C58C3E.23135913062008@newsgroups.comcast.net> (raw)
In-Reply-To: 6bg8udF3cavbgU1@mid.individual.net

In article <6bg8udF3cavbgU1@mid.individual.net>,
 Marc Tfardy <m-t-o___CUT__IT@web.de> wrote:

> tho643@gmail.com schrieb:
> > Here's an example of what I'm trying to do in my emacs console:
> > 
> > me@your-domain.com
> > you@my-domain.com
> > this@no-domain.com
> > 
> > Now after a search and replace this is what I want to get:
> > 
> > your-domain.com
> > my-domain.com
> > no-domain.com
> > 
> > I do not konw how to get rid of the 'me' 'you' 'this' and '@' in one
> > search and replace command.  I know how to change the @, but how would
> > be able to delete it, and everything else that happens to come before
> > it, on the same line.  I hope this makes sense to you.
> 
> M-x replace-regexp RET .+@\(.*\) RET \1

Even simpler:

M-x replace-regexp RET .+@ RET RET

-- 
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***


  reply	other threads:[~2008-06-14  3:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 21:09 Search and replace tho643
2008-06-13 21:59 ` Marc Tfardy
2008-06-14  3:13   ` Barry Margolin [this message]
2008-06-14 10:48     ` Marc Tfardy
  -- strict thread matches above, loose matches on Subject: below --
2004-07-03 20:57 search " David Rasmussen
2004-07-03 23:02 ` Mike Ballard
2004-07-27 23:06   ` David Combs
2004-07-03 23:04 ` Mike Ballard
2004-07-03 23:07   ` David Rasmussen
2004-07-04  9:14     ` Ole Laursen
2004-07-04  9:27       ` David Rasmussen
2004-07-04 15:51         ` Ole Laursen
2004-07-04 16:02         ` Josh Howard
2004-07-04 23:32     ` Mike Ballard

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=barmar-C58C3E.23135913062008@newsgroups.comcast.net \
    --to=barmar@alum.mit.edu \
    --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.