RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Email Domain
Expression
(([A-Za-z0-9_\\-]+\\.?)*)[A-Za-z0-9_\\-]+\\.[A-Za-z0-9_\\-]{2,6}
Description
It checks for the domain name validity. A domain name can't start with a dot(.). It can't have consecutive dots. If there are moe than one dot then there can be only 2 to 6 characters after the final dot. e.g. nitin.athena.com is valid.
Matches
athenatechnologies.co.in
Non-Matches
.athena.technologies.ccccccccc
Author Rating: Not yet rated. Nitin Kumar Aggarwal
Source i have created it myself.
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Underscore is not valid in a domain name
Name: Randal L. Schwartz
Date: 10/25/2007 3:06:13 PM
Comment:
Please learn to read the RFCs.


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials