删除字符串中带中文的指定字符
public class Test {/** * @param args */public static void main(String[] args) {String mobile = "王二小(13112345678)";// 调用String endStr = removeStr(mobile);System.out.println("删除后结果:" + endStr);}public static String removeStr(String mobile) {String content = "张三(13312348888);王二小(13112345678);李四(13412345438);";System.out.println("删除前:" + content);System.out.println("删除内容:" + mobile);String subContent = "";if (!StringUtil.isBlank(content)) {mobile = mobile.replace("(", "\\(");mobile = mobile.replace(")", "\\)");subContent = content.replaceAll(";" + mobile + "|" + mobile + ";","");}return subContent;}}