Javascript regex to replace ampersand in all links href on a page
<p>I've been going through and trying to find an answer to this question that fits my need but either I'm too noob to make other use cases work, or their not specific enough for my case.</p>

<p>Basically I want to use javascript/jQuery to replace any and all ampersands (&amp;) on a web page that may occur in a links href with just the word "and". I've tried a couple different versions of this with no luck</p>

<pre><code>var link = $("a").attr('href');
    link.replace(/&amp;/g, "and");      
</code></pre>

<p>Thank you</p>