String.replace uses Java's Regex engine which uses those characters (actually, I think there are a few other characters such as *) for special behaviors.

The simple solution is to manually search...