System.Text.RegularExpressions.Regex reg1 = new System.Text.RegularExpressions.Regex(@"[/u4e00-/u9fa5]");
if (reg1.IsMatch(hz.Text))
{
hz.Text = "汉字";
}
else {
hz.Text = "hanzi";
}
c# 测试是否是汉字
最新推荐文章于 2024-07-11 16:29:19 发布