String str = "\\"; str = str.replaceAll("\\\\","|\\\\"); System.out.println(str);
参考 https://www.cnblogs.com/xdp-gacl/p/3912784.html
java中replaceAll方法替换字符串中的反斜杠
原文:https://www.cnblogs.com/fb010001/p/11490230.html