0

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?

Myn m
  • 43
  • 8

1 Answers1

0

You can combine (\\\") and (\\.) with | (OR) operator.

Try this:

String column = columnname.replaceAll("(\\\")|(\\.)", "");
Hülya
  • 3,353
  • 2
  • 12
  • 19