i would need a code that checks if an url with filename is valid or not.
Here are a few examples:
http://www.example.com/file.zip (valid)
http://example.com/file.zip (valid)
http://www.example.com/files/file.zip (valid)
ftp://ftp.example.com/file.zip (valid)
ftp://example.com/file.zip (valid)
ftp://ftp.example.com/files/file.zip (valid)
http://www.example.com/ (not valid)
http://www.example.com (not valid)
www.example.com/file.zip (not valid)
ftp.example.com/ (not valid)
ftp.example.com (not valid)
If anybody knows a regexp for this please share with me!
Thanks