62,620
社区成员
发帖
与我相关
我的任务
分享
String str = "'都四反对'所地方似的发'所地方似的发";
str.replaceAll("'", "''");// ‘‘
str.replaceAll("'", "\\\\'");// \‘
public static void main(String[] args){
String str = "斯地方有'都四反对所'地方似的发‘所地方似的发 ";
System.out.println(str.replaceAll("\\'|\\‘","\\'\\'"));
}