Java Regex CheatsheetEscaping strings in regex replace s.replaceFirst(Pattern.quote("text to replace"), Matcher.quoteReplacement("replacement text"));