How to replace single backslash(\) to double backslash(\\)
838492Feb 16 2011 — edited Feb 17 2011Hi
I want to replace single backslash to double backslash from the string.
Code is here
-----
String data="File name :\n.txt;File name:\t.txt";
data = data.replace("\\","\\\\");
System.out.println("-->" +data);
----------
i tried to this code but its not working. Help me if anyone is know.
Please reply me asap.
Thanks