日期:2014-05-20 浏览次数:20715 次
String str_content = "\"asdasd:\"123\" , a:\"null\"\"";
String model="";
Pattern pattern2 = Pattern.compile("a:\"null\"\"");
Matcher matcher2 = pattern2.matcher(str_content);
if (matcher2.find()) {
model=matcher2.replaceAll("a:null\"");
}
String str_content = "asdasd:\"123\" , a:\"null\"";
String model="";
Pattern pattern2 = Pattern.compile(":\"null\"");
Matcher matcher2 = pattern2.matcher(str_content);
if (matcher2.find()) {
model=matcher2.replaceAll(":null");
}
System.out.println(model);
}