2018年6月8日

C# 正则表达式输入验证必须为汉字

摘要: 例子: string str = "测试"; string reg = @"^[\u4e00-\u9fa5]*$"; Match match = Regex.Match(str,reg); if (match.Success) { Console.WriteLine("输入正确!"); } else 阅读全文

posted @ 2018-06-08 17:05 尘世辣么美 阅读(417) 评论(0) 推荐(0) 编辑

导航