title: Trimming digits at the end of String
body: <p>I want to trim the last occurring numeric characters from  the String
  Eg:</p>
  
  <ul>
  <li><code>"abc123"</code> => <code>"abc"</code></li>
  <li><code>"abc12xyz34"</code> => <code>"abc12xyz"</code></li>
  </ul>
  
  <p>Written  below snippet to extract it. Just want to explore if this can be done by regex</p>
  
  <pre><code>private static  String getNumericTrimmedString(String s)
  {
  
      for(int i = s.length()-1; i &gt;=0 ; i--){
          final char c = s.charAt(i);
          if(!(c &gt; 47 &amp;&amp; c &lt; 58)){
              return s.substring(0,i+1);
          }
      }
      return "";
  }
  </code></pre>
  
  <p>Regards,
  Brinal</p>