Help replacing last occurrence of char with new char
<p>I was able to replace the first occurrence of a <code>,</code> but now I want to remove the last occurrence.</p>

<pre><code>    $(function() {
    $(".defaultUL li").each(function() {
        var text = $(this).html();
        if(text.indexOf("...")&lt;0) {
        var s = text.lastIndexOf(",");
        $(this).html(text.replace(s," "));
        }   
    });
});
</code></pre>

<p>Substituting <code>","</code> for <code>s</code> is not working like I hoped.</p>
