Re: Regex for Validating URL
| From: | Curt Zirzow | Date: | Thu, 02 Sep 2004 16:17:03 +0000 |
| Subject: | Re: Regex for Validating URL | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195593@lists.php.net to get a copy of this message | ||
* Thus wrote Nick Wilson:
>
> * and then John Holmes declared....
> > From: "Nick Wilson" <nick@stylesheet.org>
> >
> > >Does anyone have the regex to make sure an http address is full and
> > >without error? like http://www.example.com
> >
> > (?:Ž=
> > ÓÑ(ëøœQ
—g5http://(?:(?:(?:(?:(?:[a-zA-Z\d](?:(?:[a-zA-Z\d]|-)*[a-zA-Z\d])?)\.
>
> Pretty funny John.....
>
> apart from a good laugh, what does that do? ;-)
>
> All i want is to check that the url is valid. IE that it does not read
> like this for example htt://www.example.com or
> http://www@example.com
Both of those are perfectly valid.
Curt
--
First, let me assure you that this is not one of those shady pyramid schemes
you've been hearing about. No, sir. Our model is the trapezoid!