Possible Duplicate:
RegEx match open tags except XHTML self-contained tags
Hello,
i m stuck in weird regex problem, i m parsing some html table in php
regex i m using : <td[^>]*>(h.*?)</td>
<td>other data</td> <td>other data</td><td>Data_needed</td> <td>--</td>
but its matching all other data too
now i want to match it to <td>Data_needed</td> <td>--</td>
i tried some regex's which gives ouput like
other data</td> <td>other data</td><td>Data_needed</td> <td>--
starting from first <td>
to last </td>
but i want Data_needed
from <td>Data_needed</td> <td>--</td>
thanks for any help