note 77444 rejected from function.eregi by cece
| From: | cece@php.net | Date: | Fri, 31 Aug 2007 11:58:44 +0000 |
| Subject: | note 77444 rejected from function.eregi by cece | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-129937@lists.php.net to get a copy of this message | ||
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?