How to replace ',)' with ')'

How to replace ',)' with ')' I gave replaceAll(",)",")") but i was getting an error that Unmatched closing ')' near index 0. Please let me know if there is some solution to replace this.

Jon Skeet
people
quotationmark

replaceAll uses regular expressions, and bracket have a particular meaning in regular expressions. Just use replace instead, which doesn't use regex:

text = text.replace(",)", ")");

people

See more on this question at Stackoverflow