I have looked a bunch of example on this site, but still can't completely get this right. I am trying to grab only stuff between >
and <
.
Example String:
<div class='col-lg-12 hintDisplay'>slavery <b>ALSO USE</b> human trafficking</div>
First I did:
var regexp = />(.*?)</g;
var matches_array = item.toString().match(regexp);
console.log(matches_array);
and got:
>slavery <,>ALSO USE<,> human trafficking<
Then I read more and tried:
var regexp = /(>)(.*?)(?=<)/g;
var matches_array = item.toString().match(regexp);
console.log(matches_array);
and now:
>slavery ,>ALSO USE,> human trafficking
I couldn't find a document on how to get rid of the leading >
. So how do I grab on the stuff inbetween >
and <
?