Regex for validating domain name

The User Part: while Goyuix has stated what characters are not allowed.What that says implicetly is that ALL OTHER characters ARE allowed.It just makes more sense, especially from a future maintainability perspective, and will make things easier for you in the future.

So using the list of generic and country-specific top level domains (combined list) provided by the Internet Assigned Numbers Authority I put this together: /^([a-z0-9]([-a-z0-9]*[a-z0-9])?

The ending quotation mark must not be preceded by a backslash character (\).

I created this regex in Javascript that returns a boolean for Domain validation that meets the criteria to allow IP addresses and ascii domain name.

Microsoft is conducting an online survey to understand your opinion of the Technet Web site.

If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.

Search for regex for validating domain name:

regex for validating domain name-90regex for validating domain name-2regex for validating domain name-26

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “regex for validating domain name”