I want to check that user inserted URL is valid or not. I have different cases to allow user to insert URL
1) www.test.com (valid)
2) http://test.com (valid)
3) http://www.test.com (valid)
4) www.test (not valid)
So this way user will able to insert www
or http
, If user insert only www
then pre-append http://
before URL.
I found many regex but they strictly check http://
.
Thanks in advance.