Replacing all occurrences of a string in javascript?
<p>Say I have this string:</p>

<pre><code>Test abc test test abc test test
test abc test test abc
</code></pre>

<p>Doing</p>

<pre><code>str=str.replace('abc','');
</code></pre>

<p>Seems only to remove the first occurrence of <code>abc</code> in the string above. How can I replace ALL occurrences of it?</p>
