Re: Re: What would the best way to veladate a URL string?
| From: | andre at as dot no-ip dot com | Date: | Sun, 14 Dec 2003 09:39:57 +0000 |
| Subject: | Re: Re: What would the best way to veladate a URL string? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172675@lists.php.net to get a copy of this message | ||
On Sat, Dec 13, 2003 at 08:17:08PM -0500, Paul Chvostek wrote:
> Validate? How about something like:
>
>
> eregi('^(f|ht)tp://([a-z0-9._:-]+@)?([a-z0-9][a-z0-9-]+\.)+[a-z][a-z]+(/([a-z0-9.%&=-]+)?)?',$string);
I like it, but I would start with '^(ftp|gttp|https):.......'
People could be using SSL.
--
Regards,
Andre