How to get rid of the comma (,) in the output? Is there any better way to search for the url from the string or sentance.
alert("   http://www.cnn.com  df".match(/https?:\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?/));
Output from alert is:
http://www.cnn.com,,,,
 
     
     
    