On 3月9日, 下午10时51分, "A.Politz" <[EMAIL PROTECTED]> wrote:
> LegolasKiss wrote:
>
> [...]
>
> > so the log is like this now:
>
> > time cost is 3.  1234
> > time cost is 3.   234
> > time cost is 3.     5
> > .....
>
> > i want to use the regular expression in vim to change all spaces into
> > ``0'',but i can't do this in one operation.
>
> > my way is like this:
> > <esc>:%s/\(\d\.\ *\)\ /\10/g
>
> [...]
>
> This doesn't work, because it matches only in 1 position ( the
> first digit ), no matter how many whitespaces are following the dot.



>
> :s/\v(\d\.\s*)@<=\s\ze\s*\d/0/g

thanks. this is the result i want.

> -ap
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui