I am using this regex in .NET to validate email addresses:
([A-Za-z0-9]|[A-Za-z0-9](([\w,=\.!\-#|\$%\^&*\+/\?\{\}~]+)*)[\w,=!\-#|\$%\^&*\+/\?\{\}~])@(?:[A-Za-z0-9-]+\.)+[a-zA-Z]{2,9}$
One issue with it though: In the local name before the @
symbol, it accepts multiple periods in sequence. For example, ab...c@gmail.com
.
Does anyone know how I can fix that and yet keep the rest of the logic intact?
Thanks