Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • Your first method is a bit too involved for me at this point :). A note to those using an international keyboard (ex US international), don't forget to press the space bar for d^ after the ^! Commented Jun 20, 2017 at 7:58
  • 1
    @calocedrus, :h :substitute is really the way to go in your case. Once you'll master :substitute, you'll have a good grasp of a key feature of the major sed *nix command. Commented Jun 20, 2017 at 12:41
  • 1
    Many good answers, and they worked for me, difficult to select one vs others! At this point (~ 1 month after I asked), @statox's answer seems to have received most votes so I'll select it as the answer, decision also supported by Luc's advice. Commented Jul 18, 2017 at 1:35