what is the regular expression for a url without 'http://www.'? i'd like to validate whether it is uri or not when the user enters the uri name
A:
This is a great question for google. Try 'regex library'. You can find thousands of examples.
tanascius
2009-05-07 08:31:39
oh i did not know that. thanks for bringing me out of my cave. ;)
fuz3d
2009-05-07 08:47:13
regex libraries are indeed a useful resource for this kind of questions. You get a lot of differenz solutions - and a good idea how to implement it the way you need.
tanascius
2009-05-07 09:09:46
+3
A:
You can check this question: What is the best regular expression to check if a string is a valid URL.
mouviciel
2009-05-07 08:33:46
A:
Ping/nslookup the hostname the user provides.
If that works out well, you might want to try opening a connection to the hostname on port 80.
Charlie Somerville
2009-05-07 09:25:43