I am working on a website, where i have written the following regex to validate email ids and used the regex in a regular expression validator. The regex is
\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*
Its accepting valid email ids as i expected. But when my QA went with negative input testing like ak@gmail.com.com.com.com
then its allowing and saying the email id is valid. I have searched every where and almost tried in all aspects to solve this. Can any one pls help me to restrict a mail ids like above. Actually, the email ids like ak@gmail.co.in
can be accepted, but problem comes when the last string after .
repeats. Please help. I am using dot net 2005.