123456789101112131415161718 |
- using System.Text.RegularExpressions;
- namespace SC.XR.Unity.Module_PlatformAccount
- {
- /// <summary>
- /// 正则表达式配置
- /// </summary>
- public class RegexConfig
- {
- public static Regex format_phone = new Regex(@"^(\+?0?86?\-?)?(\d{7,})$");
- public static Regex format_bindingPhone = new Regex(@"^\+86(\d{7,})$");
- public static Regex format_email = new Regex(@"^.+@.+\..+$");
- //public static Regex format_password = new Regex(@"^(?=.*\d)(?=.*[A-Za-z]).{8,}$"); // 至少包含字母数字
- public static Regex format_password = new Regex(@"(?!^[0-9]+$)(?!^[A-z]+$)(?!^[^A-z0-9]+$)^.{8,}$"); // 至少包含字母数字字符中的两种
- public static Regex format_pinyin = new Regex(@"[\u4e00-\u9fa5]+"); // 是否包含中文
- public static Regex except_regionCode = new Regex(@"[^(\+?0?86?\-?)](\d{7,})$");
- }
- }
|