I am trying to create a regex for the following String-
<tr>
<td colspan=2>
<p><b>
CITY Head:
<span >
<span >##CITY##</span>
<o:p></o:p>
</span>
</b>
</p>
</td>
<td colspan=1>
I want to find the whole TD block having CITY Head in it. I could come with the following regex.
<td(.*)[\s](.*)[\s]+CITY Head+(.*)[\s](.*)[\s](.*)[\s](.*)[\s](.*)[\s](.*)[\s](.*)[\s]+<\/td>
Basically I had to write (.*)[\s]
for all the lines above and below the CITY Head. But this can be different in different cases.
Therefore, I am looking for a general way to combine all the (.*)[\s]
into something independent of the number of lines.