Domain name label validation A regex for correctly validating a domain label according to RFCs 1035 & 1123 The starting point for this code was the fragment contributed by Mark Byers in this StackOverflow question for which I am grateful.