This is unnecessarily verbose. Put all the special characters in a single regex string (which should be a private static final constant), and use a single replaceAll. Note that the first string given to replaceAll is a regex, that some characters are not working.