标签:style blog color for sp div log bs as
public class ChineseNumFromStrUtil { public static int getChineseNumFromStrUtil(String str) { int count = 0; String regEx = "[\\u4e00-\\u9fa5]"; Pattern p = Pattern.compile(regEx); Matcher m = p.matcher(str); while (m.find()) { for (int i = 0; i <= m.groupCount(); i++) { count = count + 1; } } return count; } }
标签:style blog color for sp div log bs as
原文地址:http://www.cnblogs.com/plf112233/p/4059599.html