I am trying to get data enclosed between tags in a string. I get a string in such format and I need to parse it to get only whats enclosed in tags.
var s = "Something something <details>Required data</details>";
I want to get the data that is enclosed between the <details>
tag
I tried
alert($('s').find('details').text());
But its just blank output. Regular expressions would help but it seems to me that there maybe is a better way.
I would welcome any help.
Thank you.