title: Regular Expression to replace last occurences of numbers
body: <p>I have tried a regular expression to replace last occurrence of numbers from 1 to infinity but its replacing all instances . kindly correct it and help.</p>
  
  <pre><code>"test.test.test.1.test.1.".replace(/[0-9]/g, '');
  </code></pre>
  
  <p>In the above expression i need to replace the string <code>'.1'</code>, in which any integer may come in place of <code>1</code>.</p>