代码改变世界

java中replaceAll方法替换字符串中的反斜杠

2019-09-09 10:25  方斌  阅读(1357)  评论(0编辑  收藏  举报
String str = "\\";
str = str.replaceAll("\\\\","|\\\\");
System.out.println(str);

参考
https://www.cnblogs.com/xdp-gacl/p/3912784.html