This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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>