Sometimes logical solutions can be unintuitive. If you want to replace a single backslash in Java using replaceAll there are multiple layers of escaping that leads to four backslashes as an argument for replaceAll.
String bla = "blub\\";
//escape the backslash, otherwise this line would not compile
String bla2 = bla.replaceAll("\\\\", "");
//first backslash: Java, escape the next character in String
//second backslash: Regex, escape the next character
//third backslash: Java, escape the next charcter in String
//fourth backslash: Regex, backslash that is to be replaced