Re: Regex for Validating URL
| From: | Jason Wong | Date: | Thu, 02 Sep 2004 12:34:20 +0000 |
| Subject: | Re: Regex for Validating URL | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195539@lists.php.net to get a copy of this message | ||
On Thursday 02 September 2004 18:42, Nick Wilson wrote:
> * and then Stut declared....
>
> > > Does anyone have the regex to make sure an http address is full and
> > > without error? like http://www.example.com
Define FULL and WITHOUT ERROR. Without knowing what *you* mean by full &
without error, I don't think anybody can sensibly help you. For instance for
the above example you don't even need a regex:
if ($url === 'http://www.example.com') {
echo 'Yay!, full and without error!';
}
I've a feeling that's not what you want, so tell us what you want.
> > A quick google (php regex validate url) found this...
> >
> > http://www.canowhoopass.com/guides/regex/
>
> Yes, i saw that page. As I said, I have searched *a lot* for this. That
> is a bit overkill for me,
It would be nice when asking a question to summarise what research you have
done. Instead of just saying I've looked and found nothing (or words to that
effect).
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Heisengberg might have been here.
*/