/ Published in: Java
Sometimes you *don't* want to use a regex in a String.replace method. You need to 'quote' the special regex characters with Pattern.quote("string")
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
indexString.replaceAll(Pattern.quote(notARegex), replacement );