jquery to modify a link
<p>I have the following HTML:</p>

<pre><code>&lt;TD class=ms-sctabcf &gt;
    &lt;A href="http://localdev.industrial.com:80/en-US/SearchM3/Pages/results.aspx?k=test+contenttype%3a%22IABusinessProduct%22&amp;amp;s=IA_xx-XX_Content"&gt;All Results
&lt;/A&gt;&lt;/TD&gt;
</code></pre>

<p>I need a jquery function that removes the "contenttype%3a%22IABusinessProduct%22" from the anchor tag.</p>

<p>Something like this should do it:</p>

<pre><code>function removeContentTypeFromAllResultsLinkOnGeneralSearch(){
    var anchorTag =  $('.ms-sctabcf').has('text=All Results').find('a');
    var currentLink = anchorTag.link;
    // remove the "contenttype%3a%22IABusinessProduct%22" from the link. ( match any content type value using regular expression)

    var modifiedLink = currentLink.regex.replace("contenttype%3a%22.*?%22",""); 
    anchorTag.link = modifiedLink;
}
</code></pre>

<p>Can you help me turn my pseudocode into a real jquery/javascript function? </p>

<p>Also, I need to select the a tag only if it has the inner text of "All Results". what is the jquery selector for that?</p>
