dcsimg
How to replace a plain string with string having backslash and dollar symbol
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Wednesday, September 14, 2011 05:37 PM

Hi,

I have a strange problem. I need to replace a string like below :



String a ="The path to the file is REPLACE_STRING.";


a.replaceAll("REPLACE_STRING", "\\blrtech\d$anand emp.txt");




Since there are escape sequence characters in the second argument of the method replaceAll(), i find it difficult to achieve. Please somebody help me.

About | Sitemap | Contact