RegexNormal.cs 692 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. namespace Ant.Service.Common
  6. {
  7. /// <summary>
  8. /// 关于正则验证信息类
  9. /// </summary>
  10. public class NormalRegexType
  11. {
  12. /// <summary>
  13. /// 正则验证帐号和密码的模式字符串(字母开头,允许5-16字节,允许字母数字下划线)
  14. /// </summary>
  15. public static string IsNumberOrPasswordPattern = @"^[a-zA-Z][a-zA-Z0-9_]{4,15}$ ";
  16. /// <summary>
  17. /// 正则验证Email的模式字符串
  18. /// </summary>
  19. public static string IsEmailPattern = @"\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* ";
  20. }
  21. }