Quantcast
Viewing all articles
Browse latest Browse all 14

Regular Expression to Validate Email Address in Aspnet

Does anyone know what the regex used by the email validator in ASP.NET is? Pretty please.

Solution

Here is the regex for the Internet Email Address using the RegularExpressionValidator in .NET

\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

By the way if you put a RegularExpressionValidator on the page and go to the design view there is a ValidationExpression field that you can use to choose from a list of expressions provided by .NET. Once you choose the expression you want there is a Validation expression: textbox that holds the regex used for the validator

The post Regular Expression to Validate Email Address in Aspnet appeared first on Solved.


Viewing all articles
Browse latest Browse all 14

Trending Articles