> How do you change the second matching pair in stead of the first one. > I have the following substitute but I can't get it in such a way that > it works on the second pair. > > :g/\<INPUT.*,*s\d\+/s/s\d\+/(&)/<CR> > > So > INPUT s1 , s2 > INPUT s2 , s1 > > must come > > INPUT s1 , (s2) > INPUT s2 , (s1)
You can use :%s/INPUT\s\+[^,]*,\s*\zs.*/(&) -tim --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
