How to make sure that a string contains a valid/well formed url?
I need be sure the url in the string is well formed.
It must contain http://
or https://
and .com
or .org
or .net
or any other valid extension
I tried some of the answers found here in SO but all are accepting "www.google.com" as valid.
In my case the valid url needs to be http://
www.google.com or https://
www.google.com.
The www.
part is not an obligation, since some urls dont use it.