> I am having trouble getting this global find and replace to work: > > :%s/\(<\/\+p>\)/^M\1^M/g > > Simply, it is only replacing the first instance on each line.. can > anyone guide me as to what I am doing wrong?
The regexp does indeed replace every instance on each line, but I think it may not be finding the quite the pattern you think you're looking for. Your pattern finds </p> <//p> <////p> but not <p> thanks to your \+ requiring one or more "/" characters. I suspect you may be wanting \= instead. Alternatively, if you have literal "caret capital-M", instead of a literal control+M (as entered with "control+V control-M), you might use "\r" instead of the "^M". -tim --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
