标签:
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class test{
public static void main(String[] args) {
String str = "123abc中文cde123abc提取123ab我ABC汉DEF和我们678,854中华人民共和国,美国";
Pattern p = null;
Matcher m = null;
String value = null;
p = Pattern.compile("([\u4e00-\u9fa5]+)");
m = p.matcher(str);
while (m.find()) {
value = m.group(0);
System.out.println(value);
}
}
}
留着以后用到的
标签:
原文地址:http://www.cnblogs.com/1321366271blog/p/4833262.html