I have a long String like this.
<p>Some Text above the tabular data. I hope this text will be seen.</p>
<table border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width:150px">
<p>S.No.</p>
</td>
</td>
</tr>
<tr>
<td style="width:150px">
<p>2</p>
</td>
</tbody>
</table>
<p> </p>
<p>Please go through this tabular data.</p>
<table border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td style="width:150px">
<p>S.No.</p>
</td>
</tr>
<tr>
<td style="width:150px">
<p>1</p>
</td>
<tr>
<td style="width:150px">
>
</td>
</td>
</tr>
</tbody>
</table>
<p>End Of String</p>
Now I want to extract whole string before html table and after it like this. And add "HTML Table..." inplace of HTML Table. I tried few things but not able to achive it. Tried splitting into arrays, but it didn't worked
Sample Output
<p>Some Text above the tabular data. I hope this text will be seen.</p>
<p> </p>
HTML Table....
<p>Please go through this tabular data.</p>
<p>End Of String</p>