[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search and replace

From: Marc Tfardy
Subject: Re: Search and replace
Date: Fri, 13 Jun 2008 23:59:40 +0200
User-agent: Thunderbird (Windows/20080421)

address@hidden schrieb:
Here's an example of what I'm trying to do in my emacs console:


Now after a search and replace this is what I want to get:

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 address@hidden(.*\) RET \1

But this macro do the same job:

C-a                     ;; move-beginning-of-line
C-SPC                   ;; set-mark-command
C-s                     ;; isearch-forward
@                       ;; self-insert-command
RET                     ;; newline
C-w                     ;; kill-region
C-n                     ;; next-line

and than C-x C-k r on region



reply via email to

[Prev in Thread] Current Thread [Next in Thread]