I have a email address filtering regex used in Java. It works for the most part except when trying to limit repeated dot's in the username section of the email address.
The regex I'm using (with escaping removed) is [a-zA-Z0-9\.\_\-]+@[a-zA-Z0-9]+\.[a-zA-Z]{2,5}(\.[a-zA-Z]{2,5}){0,1}
This doesn't catch a bad email address like test..test@test.com.
I've tried applying limiters to the class [a-zA-Z0-9\.\_\-]
but that causes it to fail on valid email addresses.
Any thoughts would be greatly appreciated.