I'm using the "find" tool in Netbeans 7.2 and I'm looking to make regular expression that would allow me to gather results that have multiple lines.
A sample Html code I would like to apply the regular expression on :
<tr>
<td>
<label>some label</label><span>*</span>
</td>
<td>
<label>some label</label><span>*</span>
<label>some label</label>
<label>some label</label>
</td>
</tr>
Basically, I want to gather any <td>
tag including it's content and it's end tag </td>
.
In the above example, my first result should be :
<td>
<label>some label</label><span>*</span>
</td>
and my second result expected would be :
<td>
<label>some label</label><span>*</span>
<label>some label</label>
<label>some label</label>
</td>
I've tried many different regular expressions that would pick up the start of the <td>
and the next line (if the <td>
's content is on more than one line).
Example :
<td>.*(.*\s*).*
But I'm looking to get a regular expression that can pick up every <td>
tags and their content no matter how many <label>
tags they hold.
<td>.*?</td>
– Hectic