Regular Expression Help

  • Thread starter Thread starter Lav KG
  • Start date Start date
L

Lav KG

Hi all,

Please help me convert the following expression to a valid Regex.

[a-zA-Z]{1}[0-9a-zA-Z\.\-]{0-63}@[0-9a-zA-Z]{1-64}.[a-zA-Z]{2,3}

I'm trying to validate an email address by a
RegularExpressionValidator.


Thanks in advance
Lav KG
 
The rules for SMTP email addresses are quite complex, and there are very few
regular expressions that can cover all of them. However, here is one we
created that covers almost all of them:

(?i)([-.\w]+)\@(?:((?:\d{1,3}\.){3}\d{1,3})|([-a-z0-9]+(?:\.[-a-z0-9]+)*)\.((?:com|edu|gov|int|mil|net|org|biz|info|name|museum|coop|aero|[a-z]{2})))

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

What You Seek Is What You Get.
 
Back
Top