help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: incremental regexp replace


From: Johan Bockgård
Subject: Re: incremental regexp replace
Date: Sat, 17 Jun 2006 03:39:18 +0200
User-agent: Gnus/5.110005 (No Gnus v0.5) Emacs/22.0.50 (gnu/linux)

"Ryan Krauss" <ryanlists@gmail.com> writes:

> If I use incremental regexp search as a way to figure out the
> correct syntax for my regexp, is there an easy way to copy that
> regexp into the kill-ring or something so that I can easily use it
> in a regexp replace operation?

M-e lets you manipulate the search string in a regular minibuffer.

In Emacs 22 (CVS) you can drop into query-replace directly:

    *** M-% typed in isearch mode invokes `query-replace' or
    `query-replace-regexp' (depending on search mode) with the current
    search string used as the string to replace.

    (from etc/NEWS)


(Setting `query-replace-interactive' to a non-nil value makes
query-replace always use the last search string.)

-- 
Johan Bockgård


reply via email to

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