So I am parsing a string with HTML content inside of it like this ( simplified for the purposes of the example )
var htmlProd = "this is <div> my test </div> string <div> I want to extract this </div>
Ideally, I would like to be able to extract the two sub-strings within the divs into an array with the end result being.
myStrings = ["my test","I want to extract this"]
I have tried a few things but I am stumped. This is what I have so far. I am having trouble getting each substring, I have only found solutions to get one.
var myStrings = htmlProd.match(">(.*)<");
Any help would be appreciated greatly. I would be able to use either JQuery or javascript in the solution.