检查输入的字符值 时候符合正则表达式规则

   public bool CheckInputString(string regexText, string inputText)       

  {        

     Regex regex = new Regex(regexText, RegexOptions.IgnoreCase | RegexOptions.Compiled);      

       return regex.IsMatch(inputText);

  }

原文地址:https://www.cnblogs.com/wanyuan8/p/3200446.html