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

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

Re: How modify numbers in a region by a multiplier?


From: David Kastrup
Subject: Re: How modify numbers in a region by a multiplier?
Date: Wed, 08 Dec 2010 15:16:45 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Juanma Barranquero <lekktu@gmail.com> writes:

> On Thu, Jul 1, 2010 at 15:55, Seweryn Kokot <sewkokot@gmail.com> wrote:
>
>> Imagine that I have some numbers
>>
>> 33.444 3333 4433.4443 3344 .34234
>>
>> and I want them multiplied for example by 0.1
>>
>> to receive
>>
>> 3.3444 333.3 443.34443 334.4 .034234
>
> Interactively, you can try with some variation of
>
> M-x replace-regexp \([0-9.]+\) <RET> \,(/ (string-to-number \1) 10.0) <RET>

(string-to-number \1) is overly verbose for \#1

-- 
David Kastrup


reply via email to

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