/**
* 根據正則是,替換對應內容
* @return
*/
public static String replaceByRegex(String regex,String src,String tar) {
if(regex == null || "".equals(regex)) {
return src;
}
if(src == null || "".equals(src)) {
return "";
}
if(tar == null) {
return src;
}
return src.replaceAll(regex, tar);
}static