Nov 25, 2009 #1 keenanbr Programmer Oct 3, 2001 469 IE I'm trying to replace all occurances of '[' with '\[' without success. myString = "abcd[xnj]"; myString.replaceAll("\\[", "\\\\["); can't get it to succeed. help apreciated. Regards,
I'm trying to replace all occurances of '[' with '\[' without success. myString = "abcd[xnj]"; myString.replaceAll("\\[", "\\\\["); can't get it to succeed. help apreciated. Regards,
Nov 25, 2009 Thread starter #2 keenanbr Programmer Oct 3, 2001 469 IE sorry, silly mistake it works newString = myString.replaceAll("\\[", "\\\\["); Upvote 0 Downvote
Nov 25, 2009 #3 Diancecht Programmer Jan 8, 2004 4,042 ES You can reuse the first String Code: myString = myString.replaceAll("\\[", "\\\\["); Cheers, Dian Upvote 0 Downvote