Possible Duplicate:
How can I match multiple occurrences with a regex in JavaScript similar to PHP’s preg_match_all()?
I am trying to parse an xml document like this:
var str = data.match("<string>" + "(.*?)" + "</string>");
console.log(str);
I want to get all the elements between the [string]
in an array but for some reason, it only returns the first string
element found. Im not good with regular expressions so Im thinking this is just a small regex issue.