Hi TIm, this is the output of the text when I use your command %s/\w\+/ \=submatch(0)=~'hello'?submatch(0):'' :
hello this is an example, hello to everybody hello this is the output of the text when I use your command %s/\w\+\W*/ \=submatch(0)=~'hello'?submatch(0):'' : hello this is an example, hello to everybody hello Rameo -- 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