Can someone help me with building regular expression to extract couple of URLS using regular expressions from the below string
'<a href="http://mydmncd.app.corp:8080/ag/ps?q=C~0~0~0~0~0~v2hgsds4-0Ds43Hg~94~0~~~1~0~0~~http%3a%2f%2fnghj.com" target="_blank"><img border=0
src="mydmncd.app.png" ALT="" clickUrl="http://mydmncd.app2.corp?q=1&f=4"/></a>'
Url always starts with http://mydmncd and the remaining part may vary. I have to extract the url until I find double quotes. In the above example I have to extract http://mydmncd.app.corp:8080/ag/ps?q=C~0~0~0~0~0~v2hgsds4-0Ds43Hg~94~0~~~1~0~0~~http%3a%2f%2fnghj.com
I tried with this regex /[http://mydmncd].*"/g but it is matching the last double quotes. I have also tried /[http://mydmncd].*\s/g but no luck.
See the JSFiddle
<a>elements somewhere in your document?