1 String text = "你好,,.。wo"; 2 String Reg="^[\u4e00-\u9fa5]{1}$";//正则 3 int result=0; 4 for(int i=0;i<text.length();i++){ 5 String b=Character.toString(text.charAt(i)); 6 if(b.matches(Reg)) 7 result++; 8 } 9 }