I am new to learning Jquery. I want to parse the HTML string:
<tr>
<td class="first"><b><a href="/q?s=TOM">TOM</a></b></td>
<td class="second name">Tom is a good boy</td>
<td class="last_trade"><b><span id="yfs_l10_TOM">5.45</span></b> <nobr><span id="yfs_t10_TOM">Sep 9</span></nobr></td>
<td><span id="yfs_c10_TOM"><width="10" height="14" border="0" src="abcdefgh" alt="Down"> <b style="color:#cc0000;">14.49</b></span> <span id="yfs_p20_TOM"><b style="color:#cc0000;"> (72.67%)</b></span></td>
<td><span id="yfs_v00_TOM">4,100</span></td>
<td class="last"><a href="/q/bc?s=TOM">Chart</a>, <a href="/q?s=TOM">More</a></td>
</tr>
The above string repeats 10 times with different values in the HTML I want to get the values: TOM, 5.45, 14.49, 72.67% , 4,100 for all the 10 repititions of similar strings in HTML.
string.split()is not sufficient for your needs, you'll probably want to use regular expressions andstring.match(). (Those are plain JavaScript methods, not jQuery.)