On Jan 13, 6:56 pm, ZyX <[email protected]> wrote: > Reply to message «Re: rounding numbers», > sent 20:05:39 13 January 2011, Thursday > by rameo: > > You forgot> and add new substitute call that will remove them. > > (them=dots) > > Original message: > > > > > > > > > still have a lot of troubles with "."and "," > > > My new command to include numbers with dots is: > > > %s/\d\+\.*\d*,\d\+/\=printf("%.1f", str2float(substitute(submatch(0), > > ',', '.', '')))/g > > > but it still does > > convert 15.000,56 to 15 and not 15.001 > > > > signature.asc > < 1KViewDownload
That's what I thought also but it will replace all dots in ",", also the thousand seperators and other dots No way to re-capture the numbers i.m.o. -- You received this message from the "vim_use" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
