Thank you~ I tried before: :%s/\d\+/\=\0+2/g but "\0" failed, it said "Invalid expression"
On Tue, Jul 13, 2010 at 5:12 PM, chopinx04 <chopin...@gmail.com> wrote: > This seems to do the trick: > > :%s/\d\+/\=submatch(0)+2/g > > Bye, > 0x412E > > Il 07/13/2010 10:07 AM, Aaron Guo ha scritto: > > I have a file with some numbers like below: > > > > ------------------------- 12 31 4324 321 312 432432 213 321 > > ------------------------- > > > > And I want to plus every number 5 by using regular expression, how > > to do it? > > > > > > -- Aaron Guo -- 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 > > > > -- > 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 > -- Aaron Guo -- 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