If you check the API for String's replaceAll method, you will see that it "Replaces each substring of this string that matches the given regular expression..."
In a regular expression, the $ char has special meaning (it matches the end of a line). So to match the literal $ character in a String, you need to use an escape sequence. See the "Backslashes, escapes, and quoting" topic under the regular expression link above.
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?