String.replaceAll without RegEx

Just use String.replace(CharSequence,CharSequence) rather than replaceAll.

NB: replace doesn’t just replace the first occurrence, it replaces all occurrences, like replaceAll.

Leave a Comment