System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex("[\u4e00-\u9fa5]", System.Text.RegularExpressions.RegexOptions.Multiline); string strTemp = "随机产生了了多2333afadsg不筱个af575这样的了的算法"; MessageBox.Show(reg.Matches(strTemp).Count.ToString());
相关文章: