I want to remove square brackets from a string, but I don\'t know how.
String str = \"[Chrissman-@1]\"; str = replaceAll(\"\\\\[\\\\]\", \"\"); String[] tem
The replaceAll method is attempting to match the String literal [] which does not exist within the String try replacing these items separately.
[]
String
String str = "[Chrissman-@1]"; str = str.replaceAll("\\[", "").replaceAll("\\]","");