[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Search and replace
From: |
Barry Margolin |
Subject: |
Re: Search and replace |
Date: |
Fri, 13 Jun 2008 23:13:59 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b2 (Intel Mac OS X) |
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 ***