[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Transforming Captures in replace-regexp
From: |
Jim Ottaway |
Subject: |
Re: Transforming Captures in replace-regexp |
Date: |
Sat, 17 Feb 2007 12:23:28 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.93 (gnu/linux) |
On 17 Feb 2007, Peter Danenberg wrote:
>> I'd like to transform captured groups from `replace-regexp', say,
>> by iterating over the search results with an arbitrary function.
>
>
> The answer is of course to use `\,', following by an
> arbitrary Lisp expression; read the source, Luke!
That works as long as you have Emacs 22 [I don't think it is in 21].
And you don't need to read the source
C-h C-f RET query-replace-regexp
gives all the details of the usage of \,.
I've found it an extremely useful addition to query-replace-regexp.
Regards,
--
Jim Ottaway