Columnname : Meta Data["1. Information"]
String column = columnname.replaceAll(".","\\.").replaceAll("\"", "\\\\\"");
I am trying to escape both double quotes and dot character,How can i do this?
You can combine (\\\")
and (\\.)
with |
(OR) operator.
Try this:
String column = columnname.replaceAll("(\\\")|(\\.)", "");