I want to split the following string according to the td tags:
<html>
<body>
<table>
<tr><td>data1</td></tr>
<tr><td>data2</td></tr>
<tr><td>data3</td></tr>
<tr><td>data4</td></tr>
</table>
</body>
I’v tried split("h2"); and split("[h2]"); but this way the split method splits the html code where it finds "h" or "2" and if Iam not mistaken also "h2".
My ultimate goal is to retrieve everything between <td> and </td>
Can anyone please please tell me how to do this with only using split()?
Thanks alot
No.
That would mean — in essence — parsing HTML with regex. We don’t do that ’round these parts.