asp.net - Help with a regular expression to validate a series of n email addresses seperated by semicolons -
I am using an asp.net web form RegularExpressionValidator
to ensure a text Control to validate the area in it is a series of different email addresses by semicolons.
What is the proper regex for this task?
I think this will do one thing:
^ ([A- Za-J 0-9 ._% + -] + @ [AZA-J 0-9 .-] + \ [A-Za-z] {2,4} (| $ $)) +
- [A-Za-z] {2,4} : Valid Email (to)
-
(| $$)
: Either semicolon or end of string < / Li> -
(...) +
: Repeat all once or twice
Be sure that you are using case-insensitive matching In addition, this pattern does not allow white space between the email or the beginning or end of the string.
Comments
Post a Comment