Is there any Regex to Read the contents from the following Table, note that there are many similar tables so i want only to read the following table contents.
I want to READ All the Rows from Row number 5,6,7 <TR>
My regex looks like following but doesnt work
$match = preg_replace('~<tr align="center" bgcolor="#F3F3E4">">GOLD</a></td>#[a-z0-9]{6}~i','',$match[3]);
echo '<table><tr>' . $match . '</tr></table>';
MY HTML code looks like this
<table width="571" border="0" cellspacing="0" cellpadding="0"><tr bgcolor="#000000"><td><table border="0" cellspacing="1" cellpadding="0" align="center" width="571">
<tr>
<td bgcolor="#000000"> </td>
<td align="center" bgcolor="#000000" colspan="8"><p class="white">New
York Spot Price</td>
<td></td>
<td align="right" bgcolor="#000000"> </td>
</tr>
<tr bgcolor="#F3F3E4">
<td bgcolor="#000000" width="31" nowrap></td>
<td bgcolor="#000000"> </td>
<td align="center" colspan="7" bgcolor="#F3F3E4"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b><font color=RED>MARKET IS CLOSED</font><BR>(Will open in 5 hrs. 25 mins.)</b></font></td>
<td colspan="2" align="center" bgcolor="#F3F3E4"> </td>
</tr>
<tr bgcolor="#F3F3E4" align="center">
<td bgcolor="#000000"> </td>
<td bgcolor="#000000"> </td>
<td bgcolor="#CCCC99"><p>Metals</td>
<td bgcolor="#CCCC99"><p>Date</td>
<td bgcolor="#CCCC99"><p>Time<br>
(EST)</td>
<td bgcolor="#CCCC99"><p>Bid</td>
<td bgcolor="#CCCC99"><p>Ask</td>
<td colspan="2" bgcolor="#CCCC99"><p>Change</td>
<td bgcolor="#CCCC99"><p>Low</td>
<td bgcolor="#CCCC99"><p>High</td>
</tr>
<tr bgcolor="#F3F3E4" align="center">
<td bgcolor="#000000" width="31" nowrap> </td>
<td bgcolor="#000000" nowrap> </td>
<td align="left"><p> <a href="/charts/livegoldnewyork.html" onMouseOver="ChangeImage('NY1','0')" onMouseOut="ChangeImage('NY1','1')">GOLD</a></td>
<td><p>07/10/2013</td>
<td><p>17:15</td>
<td><p>1262.90</td>
<td><p>1263.90</td>
<td><p class=spotgreen>+12.20</p></td>
<td><p class=spotgreen>+0.98%</p></td>
<td><p>1247.10</td>
<td><p>1268.40</td>
</tr>
<tr align="center" bgcolor="#F3F3E4">
<td bgcolor="#000000" width="31" nowrap> </td>
<td bgcolor="#000000"> </td>
<td align="left"><p> <a href="/charts/livesilver.html#ny" onMouseOver="ChangeImage('NY2','0')" onMouseOut="ChangeImage('NY2','1')">SILVER</a></td>
<td><p>07/10/2013</td>
<td><p>17:15</td>
<td><p>19.47</td>
<td><p>19.57</td>
<td><p class=spotgreen>+0.20</p></td>
<td bgcolor="#F3F3E4"><p class=spotgreen>+1.06%</p></td>
<td><p>19.03</td>
<td><p>19.69</td>
</tr>
<tr align="center" bgcolor="#F3F3E4">
<td bgcolor="#000000" width="31" nowrap> </td>
<td bgcolor="#000000"> </td>
<td align="left"><p> <a href="/charts/liveplatinum.html" onMouseOver="ChangeImage('NY3','0')" onMouseOut="ChangeImage('NY3','1')">PLATINUM</a></td>
<td><p>07/10/2013</td>
<td><p>17:13</td>
<td><p>1372.00</td>
<td><p>1377.00</td>
<td><p class=spotgreen>+6.00</p></td>
<td><p class=spotgreen>+0.44%</p></td>
<td><p>1358.00</td>
<td><p>1383.00</td>
</tr>
<tr align="center" bgcolor="#F3F3E4">
<td bgcolor="#000000" width="31" nowrap> </td>
<td bgcolor="#000000"> </td>
<td align="left"><p> <a href="/charts/livepalladium.html" onMouseOver="ChangeImage('NY4','0')" onMouseOut="ChangeImage('NY4','1')">PALLADIUM</a></td>
<td><p>07/10/2013</td>
<td><p>17:11</td>
<td><p>714.00</td>
<td><p>719.00</td>
<td><p class=spotgreen>+16.00</p></td>
<td><p class=spotgreen>+2.29%</p></td>
<td><p>707.00</td>
<td><p>721.00</td>
</tr>
</table></td></tr></table>