Simple question. Given a text area which might have a few urls copied and pasted, I would like to parse all of them out in to an array. Don't want to replace the contents, but get all the urls in the text area in to an array using Javascript.
EDIT
http://jsfiddle.net/sujesharukil/hyEem/19/
Created a fiddle. I have it mostly working. The only issue is, it does not pick up query string parameters. May be that should have been the question.
this is what I put in the text area
www.google.com ssdfsdfasdfasdf http://someplace.com?x=sdfsdf
regex = new RegExp(/[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi);
returns two items, but no query string params for the second one.
Help will be appreciated.