From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: How modify numbers in a region by a multiplier? Date: Thu, 01 Jul 2010 16:19:09 +0200 Organization: Organization?!? Message-ID: <87lj9vz3mq.fsf@lola.goethe.zz> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1291842164 32642 80.91.229.12 (8 Dec 2010 21:02:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 21:02:44 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 22:02:41 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQR9o-0002VB-LS for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 22:02:36 +0100 Original-Received: from localhost ([127.0.0.1]:41703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQQzd-0007d0-EE for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 15:52:05 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!news.mixmin.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help X-Face: 2FEFf>]>q>2iw=B6, xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN; i"; /yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:5GCsuPZbKZbiE0YRKJqiwwCGDXQ= Original-Lines: 22 Original-NNTP-Posting-Date: 01 Jul 2010 16:19:09 CEST Original-NNTP-Posting-Host: adadf083.newsspool2.arcor-online.net Original-X-Trace: DXC=11gZaQ^ZiQA[kmHKHnaEnMA9EHlD; 3YcB4Fo<]lROoRA8kF5MOK`al0oRJ`b List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76007 Archived-At: Juanma Barranquero writes: > On Thu, Jul 1, 2010 at 15:55, Seweryn Kokot 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.]+\) \,(/ (string-to-number \1) 10.0) (string-to-number \1) is overly verbose for \#1 -- David Kastrup