title: remove chars in string except last
body: <p>I'm tring to remove the char '.' from a string except the last occurrence; for example the string</p>
  
  <pre><code>12.34.56.78
  </code></pre>
  
  <p>should became</p>
  
  <pre><code>123456.78
  </code></pre>
  
  <p>I'm using this loop:</p>
  
  <pre><code>while (value != null &amp;&amp; value.Count(c =&gt; c == '.') &gt; 1)
   {
     value = value.Substring(0, value.IndexOf('.')) + value.Substring(value.IndexOf('.') + 1);
   }
  </code></pre>
  
  <p>I wonder if there is a cleaner way (maybe using linq?) to do this whitout an explicit loop?</p>
  
  <p>(I know there is a very similar question but is about perl and things are quite different)</p>