I would like to insert a specific character after each instance of another character in a line. For example, inserting a '\' after each instance of another '\' on a line.
So, from this: C:folder\folder2\folder3\folder4
,
to this:C:folder\\folder2\\folder3\\folder4
I was thinking it may be a variation on the s
command, but I haven't found anything that works yet. Or maybe using search and replace is a better way.
s
command does just fine::s/\\/\\\\/g
– guillem Jun 26 '18 at 6:00