Join me on Pownce!
Pownce is a great way to share messages, files, events, and links with your friends. Join today to start sending stuff!
-
Public mb69ou812 on twitter spoke of using Java's String.replaceAll method to convert \ to \\.
The code Mike came up with to do so is: str.replaceAll("\\\\", "\\\\\\\\"); which converts jere\my to jere\\my.
To continue on, to escape a quote with \' is: replaceAll("'", "\\\\'");
Code to escape a double quote with \" is: replaceAll("\"", "\\\\\"");
I'm going to wear out my backslash key!Mar 3rd Reply! Forward