I am trying to write a regular expression to return true for the following cases:
http://anythinghttp:///anything(It can have any number of "/")
But, it should return false for the following cases:
- http://
- http:/
- http:
- http
- htt
- ht
- h
http:///(It can have any number of "/")
I tried the following, but it fails in some cases. Can anyone give some pointers.
(/^(f|ht)tps?:\/\//i.test(jQuery("base").attr("href")