Javascript find and replace a set of characters?
<p>I have a string and I need to replace all the <code>&amp;#39;</code> and etc to their proper value</p>

<p>I am using</p>

<p><code>var replace = str.replace(new RegExp("[&amp;#39;]", "g"), "'");</code></p>

<p>To do so, but the problem is it seems to be replacing <code>'</code> for each character (so for example, <code>&amp;#39;</code> becomes <code>'''''</code></p>

<p>Any help?</p>
