Replace or remove nth occurrence of \n
<p>This is my string:</p>

<pre><code>var ok = "\n\n33333333333\n\n\n";
</code></pre>

<p>How to replace the 4th occurence of '\n' with ''?
Or, how to remove the 4th occurence of '\n'?</p>
