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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find RFC Compliant URI
Expression
^([A-Za-z0-9]+[A-Za-z0-9-_]*\.)*(([A-Za-z0-9]+[A-Za-z0-9-_]*){3,}\.)+([A-Za-z0-9]{2,4}\.?)+)$
Description
RFC compliant. Disallows '.' (period) to be at the front or end, or occurr more than once consecutively. It does allow for optional infinite number of sub-domains. However, the total length of the URI has not been enforced: each label must be between 1 and 63 characters long, while the total length of the domain name may not exceed 255 characters. Note that this RegEx does not check the validity of the protocol.
Matches
mine.com|me.mine.com
Non-Matches
com|me..com|me.com|me..mine.com|.mine.com
Author Rating: Not yet rated. Mike Bronner
Source
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

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