This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
In your case, there is no real need to use regex (as far as I can see). A simple String.replace(...) will do the job as well, and that method does not take a regex as parameter. But, if you do need regex, and you want to keep the escaping to a minimum, you can always use \\Q ... \\E to make the regex engine ignore any meta characters: <blockquote>code:<pre name="code" class="core">String s = "Some text \\\\r and some more \\\\r."; System.out.println(s); System.out.println(s.replace("\\\\r", "\\r")); System.out.println(s.replaceAll("\\Q\\\\r\\E", "\\\\r"));</pre></blockquote>