Regex for html parsing in php [closed]

Georneoffitte

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