I have the following piece of HTML code which I need to parse to retrieve the player name and the runs he has scored. In this case it's 'Ross Taylor' and 9. What's the best way to do parse this info? Don't want to use an HTML parser. Is REGEX the best way (I know people are dead against this! But I just want these 2 bits of info and hence don't want to use a parser)? I've been racking my brains on how I should figure out where the player name is in the html file and the consequent row which has the runs scored. The HTML comment part below is a hard coded one. I can reach this place. Then retrieve the name between the tags. Is this a good way to do it? Also how do I retrieve the runs part in the immediate next row?
<!-- <a href="javascript:void(0);" onClick="return showHwkTooltip(this, 'lvpyrbat1');" class="livePlayerCurrent">*Luke Woodcock</a>-->
<a href="/icc_cricket_worldcup2011/content/current/player/38920.html" target="_blank" class="livePlayerCurrent" title="view the player profile for Ross Taylor">
*Ross Taylor
</a> <span style="margin-left:5px;" title="left-hand bat">(lhb)</span >
</td >
<td><b>9</b></td>
<td>9</td>
<td>1</td>
<td>0</td>
<td>100.00</td>
<td></td>
<td colspan="3" align="left"><span class="batStyl">striker</style></td>
<td></td>
<td colspan="8"></td>
</tr>
Please let me know if you need more info.
Regards, Sam