---
title: "what is email validation's regular expression in asp.net"  
description: "what is email validation's regular expression in asp.net"  
author: "Andrew Deniel"  
published: 2013-06-08  
updated: 2020-09-23  
canonical: https://www.mindstick.com/interview/1764/what-is-email-validation-s-regular-expression-in-asp-dot-net  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# what is email validation's regular expression in asp.net

By using below reg expression we can validate email id\
^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$\
"^[_a-z0-9-]+": start with any underscore or alphanumeric one or more then one alfanumaric word"(\.[_a-z0-9-]+)*@":any dot(.) or alphanumeric zero times or more the zero and a @ sign"[a-z0-9-]+":one or more alphanumeric "(\.[a-z0-9-]+)*": zero or more dot alphanumeric or -(mins sign)"(\.[a-z]{2,5})$": End with two to 5 character may use dot (.) in that

## Answers

### Answer by Durgesh Tripathi

The RegularExpressionValidator control is used to ensure that an input value matches a specified pattern.\
It's used for email validate,numbervalidate, url validtate, special symbol validate, etc.

Syntax for Regular Expression Validator

<asp:TextBox ID="txtEmailID" runat="server"></asp:TextBox> \
<asp:RegularExpressionValidator ID="revEmailID" runat="server" \
ControlToValidate="txtEmailID" \
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*">*</asp:RegularExpressionValidator>

### Answer by Andrew Deniel

By using below reg expression we can validate email id\
^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$\
"^[_a-z0-9-]+": start with any underscore or alphanumeric one or more then one alfanumaric word"(\.[_a-z0-9-]+)*@":any dot(.) or alphanumeric zero times or more the zero and a @ sign"[a-z0-9-]+":one or more alphanumeric "(\.[a-z0-9-]+)*": zero or more dot alphanumeric or -(mins sign)"(\.[a-z]{2,5})$": End with two to 5 character may use dot (.) in that


---

Original Source: https://www.mindstick.com/interview/1764/what-is-email-validation-s-regular-expression-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
