Imagine you're editing a line like this:
String path = "/usr/local/share/dir/file.txt";
..and you want to change it to
You could type in something like:
And then lose your mind in a sea of backslashes. You don't need to.
/ is the default pattern separator for search & replace, but you can use almost anything. The first character after
:s is taken as the separator, so this much-simpler version works just as well:
The next time you find yourself counting backslashes to fix a
E486: Pattern not found error, remember you have an easy alternative.