I am needing to check the url entered on a page and its still matching http:// only string. I want it to fail if user only enters http://
Regex pattern
^(https?:\/\/)(www\.)?(([a-zA-Z]+)?(\.[a-zA-z]{2,6})?)((\d{1,3}\.){3}(\d{1,3}){1})?$/gm
tests:
google.com <---- fails as it should
https://google.com <---- Pass
https:google.com <---- fails as it should
www.cool.com.au <---- fails as it should
https://asdsds.Com
http://a <---- Pass
https:// <---- Pass **BUT SHOULD FAIL**
http://10.10.10.00 <---- Pass
http://www.cool.com <---- Pass
https://123123.asd <---- fails as it should
http://www.cool.com.au/ersdfs <---- fails as it should
http://www.cool.com.au/ersdfs?dfd=dfgd@s=1 <---- fails as it should
http://www.cool.com:81/index.html <---- fails as it should