// 表达式对象 Pattern p = Pattern. compile("[\\?\*\:\[\]\/]"); // 创建 Matcher 对象 Matcher n = p.matcher(systemName); Matcher m = p.matcher(unitCodeName); // 替换 String sheetNameSystem = n.replaceAll( ""); String sheetNameUnit = m.replaceAll( "");