Re: Regex for Validating URL
| From: | John Holmes | Date: | Thu, 02 Sep 2004 13:56:47 +0000 |
| Subject: | Re: Regex for Validating URL | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195561@lists.php.net to get a copy of this message | ||
From: "Jason Wong" <php-general@gremlins.biz>
Does anyone have the regex to make sure an http address is full and without error? like http://www.example.comSome "best of the internet" site... I had to pull it from the Google cache since work wouldn't let me get to the site. I don't even know if it really works or not... :) ---John Holmes....(?:http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\. )*(?:[a-zA-Z](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?))|(?:(?:\d+)(?:\.(?:\d+)[snip] Did you just pulled it out of your ***[1] or did you copy-n-paste it from somewhere?