Displaying page
of
pages;
Items to
Title |
Test
Details
FQDN Validation
|
Expression |
(?=^.{1,254}$)(^(?:(?!\d+\.|-)[a-zA-Z0-9_\-]{1,63}(?<!-)\.?)+(?:[a-zA-Z]{2,})$)
|
Description |
Validates MS FQDNs. 1) Entire fqdn less than 255 chars. 2) Host and domain names may contain an underscore. 3) 1st char can be a number. 4) No part can be all numbers. 5) Allows any TLD Works in C#. Based on Remi Sabourin's regex. Based on anonymous feedback I've corrected it to no longer match domains that start or end with a hyphen.
|
Matches |
host.domain.com | _host.domain.com | 1host-2._ldap.domain.com
|
Non-Matches |
33.domain.com | host..com | a-.com
|
Author |
Rating:
Scott Mulcahy
|
Displaying page
of
pages;
Items to