Note Submitter: Shea Sollars
----
To validate a hostname (found on this page):
$domain =
"([[:alpha:]][-[:alnum:]]*[[:alnum:]])(.[[:alpha:]]
[-[:alnum:]]*[[:alpha:]])+";
But can't this be simplified to:
$domain = "([a-z0-9.-]{1,255})(.[a-z]{2,4})+";
And get the same results? What's the difference?
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|