";// String temp = "我是中文啊啊";// Matcher matcher = Pattern.compile("[u4e00-u9fa5] ").matcher(temp);// while (matcher.find()) {// System.out.println(matcher.group(0));// }// System.out.print(isChinese(temp)); String path = "E:\爬取数据\美剧\THE\美队剧"; File file = new File(path); String[] filelist = file.list(); for (String name : filelist) { int end = name.lastIndexOf("."); String temp = name.substring(0, end); System.out.println(temp);// Matcher matcher = Pattern.compile("[u4e00-u9fa5] ").matcher(temp);// String chinese = "";// while (matcher.find()) {// chinese = matcher.group(0);// System.out.println(chinese);// }// if (!"".equals(chinese)) {// name = name.replace(chinese, "");// File oldFile = new File(path "\" name);// File newFile = new File(path "\" temp "\" name);// oldFile.renameTo(newFile);// } } }}