I\'m looking for the regex to validate hostnames. It must completely conform to the standard. Right now, I have
^[0-9a-z]([0-9a-z\\-]{0,61}[0-9a-z])?(\\
Take a look at the following question. A few of the answers have regex expressions for host names
Could you specify what language you want to use this regex in? Most languages / systems have slightly different regex implementations that will affect people's answers.