I have a string of html contained in between [marquee][/marquee] tags in the string like so:
var s = '[marquee]<p>some html here 1</p>[/marquee][marquee]<p>some html here again 2</p>[/marquee]';
what I would like to do is match each one of these marquees to create an array with each marquee as an array element.
What I've tried so far is:
var marqueeArray = s.trim().match(/\[marquee\][\s\S]*\[\/marquee\]/g);
but all i get back is and array with the length of 1. both marquees end up being included as one string like this:
["[marquee]<p>some html here 1</p>[/marquee][marquee]<p>some html here again 2</p>[/marquee]"]
what i would like is this:
["[marquee]<p>some html here 1</p>[/marquee]", "[marquee]<p>some html here again 2</p>[/marquee]"]
eventually i will need to remove the brackets ([marquee] and [/marquee]) from each element and replace with and join one big string for use in the application. any point in the right direction on that would be great as well.