I have a string with "Dollars" and "Cents" symbol in it. I want to remove them. I tried
string.replaceAll("[\"\\u00A2\" $]", "")
but its not working. What is the correct way to do it.
string = string.replaceAll("¢|\\$", "");
or
string = string.replaceAll("\\u00A2|\\$", "");
$
is a special character in regular expressions, so you have to escape it, unless it's in a character class.