this sounds like something you could just google, but been looking for hours.
basically have this string i am ajaxing from another site
'function onclick(event) { toFacebook("http://www.domain.com.au/deal/url-test?2049361208?226781981"); }'
it comes out like that because im extracting the onclick.
i just want to extract the url from the string.
any help would be greatly appreciated.
---- edit ----
OK IF I GO HERE..http://regexlib.com/RESilverlight.aspx regext online tester
and run this regex.
(http|ftp|https):\/\/[\w\-_]+(\.[\w\-_]+)+([\w\-\.,@?^=%&:/~\+#]*[\w\-\@?^=%&/~\+#])?
on my string, it highlights the url perfectly.. i just can get it to run with JS?
if it is always with the dash (i'm assuming you want everything before the dash), you can use the split method:
var arr = split(val);
your data will be in arr[0]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With