Ok, I think I need to repost my question that was originally:
Javascript Regex group multiple
with a full example. I have:
var text = ""+
"<html> " +
" <head> " +
" </head> " +
" <body> " +
" <g:alert content='alert'/> " +
" <g:alert content='poop'/> " +
" </body> " +
"</html>";
var regex = /<([a-zA-Z]*?):([a-zA-Z]*?)\s([\s\S]*?)>/m;
var match = regex.exec( text );
console.log(match)
Output from console.log is:
The problem is that I am only getting the result for the first ... not the other... what can I do to be able to capture and walk over all stuff that matched?