I have this regex:
(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})
which works fine except it accepts a URL like:
http://55https//www.google.com/
How can I make it not allow something like
55https//
after
http://
has already been entered? (or before www or the actual start of the domain name).
The regex accepts these as well:
www.demo.com
~http://foo.co.uk/