Need help with parsing a URL list to get the host names
I have a form where I ask my users for a comma seperated web site list.
I want to make sure this list only contains the host names of URLs without any white spaces
Original list: site1.com, http://site2.com, http://www.site3.com,sub.site4.com
Edited list: site1.com,site2.com,site3.com,sub.site4.com
Currently I have the following to get the comma separated list
Can some one please help me with above task of getting host names and trimming for white spaces?
var list = document.getElementById( "list" ).value ;