If I use these command in bash shell:
echo 'abc' | sed 's/b*/1/g'
It would display:
1a1c1
But when I try it in VIM:
(open a document, turn into edit mode and simply type 'abc', and then turn into command mode)
:s/b*/1/g
it would display:
1a1c
I'm wondering why I get different results(no 1 at the tail when using VIM) through the same way (basic regular expression)...
I think /b*/ would match the null string between 'c' and '$', and a substitution would be taken (just like what 'sed' done above).
-- 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
No comments:
Post a Comment