in reply to Multiple line regex match

If the match succeeded, then the first .* could not have matched eveything to the end of the data.

But the second .* may have been greedier than you like; do you have this somewhere?

<td [something]></td>

(That is, an empty TD element.)

Bottom line: either try .*? to make your matches not greedy, or (as I'm sure millions of people will have told you before I can press "submit") use an HTML parser and not regular expressions to parse your data. :)