Does anyone have a regular expression handy that will match any legal DNS hostname or IP address?
It\'s easy to write one that works 95% of the time, but I\'m hoping
on php: filter_var(gethostbyname($dns), FILTER_VALIDATE_IP) == true ? 'ip' : 'not ip'
filter_var(gethostbyname($dns), FILTER_VALIDATE_IP) == true ? 'ip' : 'not ip'