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

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 1
Title Test Details Pattern Title
Expression
^[a-z]+([a-z0-9-]*[a-z0-9]+)?(\.([a-z]+([a-z0-9-]*[a-z0-9]+)?)+)*$
Description
A simple regex which should validate a domain name according to RFC 1035 updated to match domain names with hyphens
Matches
www.domain.com | w123.d42omain.c43om | ww-w.d-omain.com
Non-Matches
1www.domain.com | www.1domain.com | www.domain.com-
Author Rating: Not yet rated. Tinus Norstved
   Displaying page 1 of 1 pages; Items 1 to 1

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