I need to match the domain name form the string .With three different pattern.
var str=" with http match http://www.some.com and normal website type some.com and with www.some.com  ";
var url = /(http|ftp|https):\/\/[\w-]+(\.[\w-]+)+([\w.,@?^=%&:\/~+#-]*[\w@?^=%&\/~+#-])?/g;
console.log(str.match(url))Above snippet match only with http://www.some.com.
But i need to match with three types.
- http://www.some.com
- www.some.com
- some.com
Help me find the result.I am not very well in regex.I get this regex pattern from stack overflow. But the not satisfied with three conditions.
 
     
     
     
     
     
    