Re: [PHP] Re: What would the best way to veladate a URL string?

2003-12-14 Thread andre
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.

Re: [PHP] Re: What would the best way to veladate a URL string?

2003-12-13 Thread Philip J. Newman
Hay that works better thanks - Original Message - From: "Paul Chvostek" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 14, 2003 2:17 PM Subject: [PHP] Re: What would the best way to veladate a URL string? > On Sun, Dec 14, 2003 at 11:23:25A

[PHP] Re: What would the best way to veladate a URL string?

2003-12-13 Thread Paul Chvostek
On Sun, Dec 14, 2003 at 11:23:25AM +1300, Philip J. Newman wrote: > > What would the best way to veladate a URL string? 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); You can adjust the "get" part to su