I have an html string with multiple table tags.
String str = '<table>......</table> <table>....</table>';
when I use string.js and the following code.
S(str).between('<table>', '</table>').s,
I am only getting the 1st table element of the string. I need to get all the table elements (possibly as an array). Is this possible with stringjs? is it better to use stringjs or a regular expression?
I'd say you need to split the big string, remove occurrences of
<table>and</table>, and then map through the resulting array. Something likeIt only works when you have a huge string that represents many
tablesiblings, and that's exactly what you asked for.