RE: replace from backward?

2009-11-17 Thread John Beckett
Peng Yu wrote: > :%s/a/b > > The above command replace the first appearance of 'a' to 'b' > in all lines. I'm wondering how to replace the last 'a' instead? %s/.*\zsa/b/ John --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more i

replace from backward?

2009-11-17 Thread Peng Yu
:%s/a/b The above command replace the first appearance of 'a' to 'b' in all lines. I'm wondering how to replace the last 'a' instead? --~--~-~--~~~---~--~~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillis