[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: query-replace-regexp number number+1
From: |
David Kastrup |
Subject: |
Re: query-replace-regexp number number+1 |
Date: |
Tue, 11 Apr 2006 18:14:42 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"rturrado" <rturrado@gmail.com> writes:
> Hi,
>
> I wonder if you can do that easily in emacs: to search for a number,
> let's say \([0-9]+\), and replace it with its successor, let's say
> \1+1. The query I've just written would replace 25 with 25+1. What I
> want is to evaluate 25+1 and replace 25 with 26.
With a developer Emacs, you can do
C-M-% \([0-9]+\) RET \,(1+ \#1) RET
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum