I\'m trying to match all the images elements as strings,
This is my regex:
html.match(/
]+src=\"http([^\">]+)/g);
Th
Perhaps this is what you are looking for:
What I did is slightly modified your regex then used the exec
function to get array of matched strings. if you have more then 1 match the other matches will be on results[2]
, results[3]
...
var html = '
';
var re = /
]+src="http:\/\/([^">]+)/g
var results = re.exec(html);
var source = results[1];
alert(source);