统计多少个汉字与字母

private int CountWords(string text)
        {
            var count = Regex.Matches(text, @"[\u4e00-\u9fa5]|[a-zA-X]+").Count;
            return 30 + count;
        }

posted @ 2015-10-07 16:53  shiningrise  阅读(270)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css