Remove all occurrences except last?
<p>I want to remove all occurrences of substring = <code>.</code> in a string except the last one.</p>

<p>E.G:</p>

<pre><code>1.2.3.4
</code></pre>

<p>should become:</p>

<pre><code>123.4
</code></pre>
