[C#] 정규식 전자 메일 유효성 검사
꽁스짱
C#
0
1241
2021.07.12 11:29
using System.Text.RegularExpressions;
private bool EmailValidation(string pEmail)
{
return Regex.IsMatch(pEmail,
@"^(?("")("".+?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" +
@"(?(\[)(\[(\d\.)\d\])|(([0-9a-z][-\w]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9][a-z0-9]))$",
RegexOptions.IgnoreCase, TimeSpan.FromMilliseconds(250));
}