public String replaceAll(String regex, String replacement)
This method works fine if replacement string does not contain ‘$’ or ‘/’ characters.If replacement string contains these characters, the results can be in-accurate.
Fix: Use Matcher.quoteReplacement(replacement)
public String replaceAll(String regex,
Matcher.quoteReplacement(replacement))