Good Morning,
In my application my email validation is not working correctly, I have tried different types of reg. expressions. The user can select mulitple email addresses and click a button which populates a text box with the comma delimeted list and the user can also enter email addresses into the text box. I have been trying for a few days to create an email validation to check for the correct string format, with no luck. Sometimes it will catch an invalid format, if one email address is entered, but with multiple email addresses it doesn't work. Reg expression used below:
\w([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*([,;])\s*\([-+.\w])*@\w+([-.]\w+)*\.\w+([-.+]\w+)*)*
^[_a-zA-Z0-9-]+(\._a-zA-Z0-9-]+)@[a-zA-Z0-9-]+)*\.(([0-9]{1,3})|([a-zA-Z]{2,3})|(USMC.MIL))$
I prefer the last reg. expression, but I cannot figure out how to make it check for multiple email adress and to make sure that has the correct domain.
Thanks,
Mary
Edited by: MaryM on May 2, 2011 12:44 PM