tangxu
2024-05-30 9d2e93a197a0babf0761d7517f43d9d83143218b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
namespace IStation.Untity
{
    /// <summary>
    /// 正则表达式 辅助类
    /// </summary>
    public class RegExHelper
    {
        /// <summary>
        /// 验证邮箱账户格式
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public static bool VerifyEmailFormat(string text)
        {
            if (!System.Text.RegularExpressions.Regex.IsMatch(text, @"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$"))
                return false;
            return true;
        }
    }
}