DEMO:

 

//正则表达式匹配纯中文和字母
            bool isPass = System.Text.RegularExpressions.Regex.IsMatch(inputString, @"^[\u4e00-\u9fa5A-Za-z]+$");
            //加上中英文标点符号
            isPass = System.Text.RegularExpressions.Regex.IsMatch(inputString, @"^[\、\,\。\;\:\‘\’\!\,\.\;\:\'\!\u3002\uff1b\uff0c\uff1a\u201c\u201d\uff08\uff09\u3001\uff1f\u300a\u300b\u4e00-\u9fa5A-Za-z]+$");
            if (isPass == false)
            {
               
            }

相关文章:

  • 2021-11-17
  • 2021-11-17
  • 2022-12-23
  • 2021-12-10
  • 2021-11-17
  • 2021-11-17
猜你喜欢
  • 2021-10-31
  • 2022-12-23
  • 2022-12-23
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2021-11-17
相关资源
相似解决方案