Replace numeric value with another
<p>I have a span in my HTML as follows, which I am assigning the text from code behind:</p>

<pre><code>&lt;span id="NewL1" visible="false"
    runat="server"&gt;&lt;span runat="server" id="NewL"&gt;&lt;/span&gt;&lt;/span&gt;
</code></pre>

<p>The text would be something like : "you have 3 notifications."</p>

<p>I want to change the numeric value in jQuery. I have tried this but nothing happens:</p>

<pre><code>var notification = $("#NewL");
var numb = notification.text().match(/\d/g);
var finalTotalCount = parseInt(numb) - 1;
notification.text(notification.text().replace(numb, finalTotalCount ));
</code></pre>

<p>What I am doing wrong?</p>
