match a picture from js code example
Example: js match img
var html = '<img src="http://static2.ccn.com/ccs/2013/02/CC_1935770_challenge_accepted_pack_x3_indivisible.jpg" />';
var re = /<img[^>]+src="http:\/\/([^">]+)/g
var results = re.exec(html);
var source = results[1];
alert(source);