SyntaxFix
Write A Post
Hire A Developer
Questions
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("\\]","");