On Thu, Aug 11, 2005 at 03:45:24PM +0100, Kevin O'Riordan wrote:
>> > new one:
> > /(ftp:\/\/|http:\/\/|https:\/\/|www|[a-zA-Z0-9-]+\.|[a-zA-Z0-9\.-]+@)(([a-zA-Z0-9-][a-zA-Z0-9-]+\.)+[a-zA-Z]+[a-zA-Z0-9-,\.\/\_\?\%\#\&\=\;\~\!\(\)]+)/
> > the old one was also vulnerable to stupid domains like -.-.- - the new
> > one is still not perfect, but ...
>Of course ... there are potential problems with this too:
A valid hostname can be
where the tld is a fixed set, but once you've come to that point,
Remember too that http://192.168.1.1/ is also a valid URL :)
I'd be fairly sure this comes under wheel reinvention - and that there
are a number of well-tested solutions out there !
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!