C#匹配中文

1   public static bool ContainsChinese(string text)
2         {
3             if (string.IsNullOrEmpty(text))
4                 return false;
5             string pattern = "[\u4e00-\u9fbb]";
6             return Regex.IsMatch(text, pattern);
7         }

 

posted @ 2018-10-18 11:50  小·糊涂仙  阅读(325)  评论(0编辑  收藏  举报