Debating Code - [ASP.NET, C#, Sql Server, VB.NET]

Wednesday, July 1, 2009

ASP.NET EMail Validation – Revised.

Sometimes back, I had searched to find an easy way to validate email address with some restricted patterns such as fixed domains, common suffices, etc.

The very common regular expression for email validation is as we know:


But if we want to restrict emails of specific domains, that is also simply possible by :


The above expression will validate only if the emails are with and in the suffix.

And When we want to have a specific pattern in the email:


With the above expression, we can validate email ids with the format,, etc. As we could have @domA as the part of the email address after @ symbol.

Labels: , , , , , , ,

posted by Karthikeyan @ 9:28 AM


Post a Comment

Subscribe to Post Comments [Atom]

<< Home