After hours of searching, I'm still stuck on this issue that seems like it could easily be solved with a quick Google search.
Basically, I have this string that I'm ajaxing from another site:
'function onclick(event) { toFacebook("http://www.domain.com.au/deal/url-test?2049361208?226781981"); }'
It looks like this because I'm extracting the onclick.
All I want to do is extract the URL from the string.
Any assistance would be greatly appreciated.
---- edit ----
If I go to http://regexlib.com/RESilverlight.aspx online regex tester
and use this regex:
(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?
it perfectly highlights the URL in my string. I just can't figure out how to make it work with JavaScript?