I was editing a file and found accidentally that I somehow escaped all the forward slashes in a path I was replacing in text. And that is something very useful!

For instance, to do this replacement correctly I should escape the second path:


I did that somehow with an accidental keystroke! But which one? :-(

Thank you.


1 Answer 1


You don't need to escape them: you could use a different separator for the search pattern and the replace part:


But, if you really want to escape them, you can use a backslash (\):


(much harder to read, IMO)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.