Replace all in javascript for one occurance
<p>I have to replace <code>""</code> (two quotes) with <code>"</code> (one quotes). I used:</p>

<pre><code>string.replace(/""/g,'"')
</code></pre>

<p>but if it is having <code>""""</code> (four quotes) it is replacing with <code>"</code> (one quote) it is again replacing the <code>""</code> (two quotes) with <code>"</code> (one quote).</p>

<p>I need <code>""""</code> (four quotes) should be replaced with <code>""</code> (two quotes) </p>
