I need to be able to get all content between any html tag. Currently I am using:
var result = data.match(/<p>(.*?)<\/p>/g).map(function(val){
// validate
}
The closest I have got is: <[a-z1-9]{1,10}>(.*?)<\/[a-z1-9]{1,10}>
However looking at a regex tester, it is not correct.
It's not closing on matching tags and is even missing some out, what am I missing?
My aim is to get anything between all tags not between a certain two.