"Philip J. Newman" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > so far i got ... > if (!ereg("^http:\/\/([_\.0-9a-zA-Z-]+\.)+[a-zA-Z]/i",$websiteUrl) {
On a quick glance, three things stand out: 1) You allow underscores in the website domain, but these are not valid characters for domain names. 2) You allow dashes in the first pattern, but do not escape the dash character. 3) You have not provided a quantifier to the top-level domain pattern: [a-zA-Z], so it is only looking for one character fits the class [a-zA-Z]. Hope that helps, Al -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php