Re: Regex for Validating URL
| From: | Nick Wilson | Date: | Thu, 02 Sep 2004 18:40:45 +0000 |
| Subject: | Re: Regex for Validating URL | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195640@lists.php.net to get a copy of this message | ||
* and then Manuel Lemos declared....
> >Does anyone have the regex to make sure an http address is full and
> >without error? like http://www.example.com
>
> Usually I use this expression:
>
>
> '^(http|https)\://(([-!#\$%&\'*+.0-9=?A-Z^_`a-z{|}~^?]+\.)+[A-Za-z]{2,6})(\:[0-9]+)?(/)?/'
>
DING DING DING!! Ladies and gentleman, i think we have a winner! ;-)
You know guys? I think you all take this a bit too seriously,
perdanticness (is there such a word?) is all well and good for an FBI
agent but I stand by the claim that my original question really was
rather simple.
Thanks Manuel, I have it working already but that looks remarkably
similar to the one I have, im sure it's the same ;-)
thanks again...
--
Nick W