i want to match the url with contatin http/https
and (www)
or without (www)
with the help of regular expression. following is my regualr expression
^((https?)://)(www\\.)| ^$ +(\.[a-z0-9-]+)+([/?].*)?$
but in this, the empty string is not work for example :
when i enter http://www.google.com
is valid url but http://google.com
is not valid.
thanks for the answer in advance.