Trouble figuring out correct selector
<p>This is a little complicated so I will try and explain as best as I can. In the following code the goal is to find a td with the text "(Backordered)" and replace it with a link with the following URL</p>

<pre><code>/Email_Me_When_Back_In_Stock.asp?ProductCode=H210-10 
</code></pre>

<p>The "H210-10" needs to be extracted from the 1st sibling td, in this case</p>

<pre><code>&lt;td class="smalltext colors_text"&gt;H210-10&lt;/td&gt;
</code></pre>

<p>Note: there can be more than one tr > td with "(Backorder)" in it and I need to do this for each and every one that has "(Backorder)" in it. I am struggling on how to tackle this issue. I have no access to the markup.  </p>

<pre><code>&lt;table cellspacing="1" cellpadding="3" border="0" bgcolor="#cccccc"&gt;
&lt;tr class="colors_backgroundlight"&gt;
&lt;td&gt;Item#&lt;/td&gt;
&lt;td&gt;Item Name&lt;/td&gt;
&lt;td&gt;Our Price&lt;/td&gt;
&lt;td&gt;Qty&lt;/td&gt;
&lt;td&gt;&lt;b&gt;Add&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="#ffffff" class="Multi-Child_Background"&gt;
&lt;td class="smalltext colors_text"&gt;H211-41&lt;/td&gt;
&lt;td class="productnamecolorSMALL colors_productname"&gt;J. Herbin Small Glass Dip Pen - Amber Frosted&lt;/td&gt;
&lt;td class="smalltext colors_text"&gt;&lt;b&gt;$15.75&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="textbox" value="1" name="QTY.H211-41" maxlength="8" size="5"&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="checkbox" value="H211-41" name="ProductCode"&gt;&lt;/td&gt; 
&lt;/tr&gt;
&lt;tr bgcolor="#ffffff" class="Multi-Child_Background"&gt;
&lt;td class="smalltext colors_text"&gt;H211-09&lt;/td&gt;
&lt;td class="productnamecolorSMALL colors_productname"&gt;J. Herbin Small Glass Dip Pen - Black Frosted&lt;/td&gt;
&lt;td class="smalltext colors_text"&gt;&lt;b&gt;$15.75&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="textbox" value="1" name="QTY.H211-09" maxlength="8" size="5"&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="checkbox" value="H211-09" name="ProductCode"&gt;&lt;/td&gt; 
&lt;/tr&gt;
&lt;tr bgcolor="#ffffff" class="Multi-Child_Background"&gt;
&lt;td class="smalltext colors_text"&gt;H210-10&lt;/td&gt;
&lt;td class="productnamecolorSMALL colors_productname"&gt;J. Herbin Small Glass Dip Pen - Blue Striped&lt;/td&gt;
&lt;td class="smalltext colors_text"&gt;&lt;b&gt;$15.75&lt;/b&gt;&lt;/td&gt;
&lt;td colspan="2"&gt;&lt;b&gt;&lt;font color="#cc0000"&gt;&lt;span class="331"&gt;(Backordered)&lt;/span&gt;
&lt;/font&gt;&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr bgcolor="#ffffff" class="Multi-Child_Background"&gt;
&lt;td class="smalltext colors_text"&gt;H210-30&lt;/td&gt;
&lt;td class="productnamecolorSMALL colors_productname"&gt;J. Herbin Small Glass Dip Pen - Green Striped&lt;/td&gt;
&lt;td class="smalltext colors_text"&gt;&lt;b&gt;$15.75&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="textbox" value="1" name="QTY.H210-30" maxlength="8" size="5"&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="checkbox" value="H210-30" name="ProductCode"&gt;&lt;/td&gt; 
&lt;/tr&gt;
&lt;tr bgcolor="#ffffff" class="Multi-Child_Background"&gt;
&lt;td class="smalltext colors_text"&gt;H210-20&lt;/td&gt;
&lt;td class="productnamecolorSMALL colors_productname"&gt;J. Herbin Small Glass Dip Pen - Red Striped&lt;/td&gt;
&lt;td class="smalltext colors_text"&gt;&lt;b&gt;$15.75&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="textbox" value="1" name="QTY.H210-20" maxlength="8" size="5"&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="checkbox" value="H210-20" name="ProductCode"&gt;&lt;/td&gt; 
&lt;/tr&gt;
&lt;tr bgcolor="#ffffff" class="Multi-Child_Background"&gt;
&lt;td class="smalltext colors_text"&gt;H211-77&lt;/td&gt;
&lt;td class="productnamecolorSMALL colors_productname"&gt;J. Herbin Small Glass Dip Pen - Violet Frosted&lt;/td&gt;
&lt;td class="smalltext colors_text"&gt;&lt;b&gt;$15.75&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="textbox" value="1" name="QTY.H211-77" maxlength="8" size="5"&gt;&lt;/td&gt;
&lt;td&gt;&lt;input type="checkbox" value="H211-77" name="ProductCode"&gt;&lt;/td&gt; 
&lt;/tr&gt;
&lt;tr&gt;&lt;td bgcolor="#ffffff" align="right" class="smalltext colors_text Multi-Child_Background" colspan="5"&gt;Check the items you wish to purchase, then click
&lt;input type="hidden" value="Y" name="IsMultiChildAddToCart"&gt;
&lt;input type="hidden" value="ShoppingCart.asp" name="ReturnTo"&gt;
&lt;input border="0" type="image" alt="J. Herbin Small Glass Dip Pen" name="btnaddtocart" src="/v/vspfiles/templates/140/images/buttons/btn_addtocart.gif"&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
</code></pre>
