Hi I am trying to retain backslash in a string but backslash is getting printed and when it is inserted in redshift database it is inserted as two double quote.Can any one help here please!
str="I\"THIS IS TEST[1]\""
String resStr = str.replaceAll("[^\\x00-\\x7F]|[\u0001]|[\uFF3C]", "");
System.out.println("resStr----"+resStr);
prints as : I"THIS IS TEST[1]" and when it is inserted in redshift db , is inserted as I""THIS IS TEST[1]"" (i.e. with two doubt quote , not sure why)
How to retain the backslash \ in the String str. Please need help here.