java正则表达式统计指定内容的汉字个数

String str = "ini的博客艾妮";  
System.out.println(str.length()-str.replaceAll("[\u4e00-\u9fa5]", "").length());
相关文章
相关标签/搜索