title: Parse a number from a string with non-digits in between
body: <p>I am working on .NET project and I am trying to parse only the numeric value from string.  For example,</p>
  
  <pre><code>string s = "12ACD";
  int t = someparefun(s); 
  print(t) //t should be 12
  </code></pre>
  
  <p>A couple assumptions are</p>
  
  <ol>
  <li>The string pattern always will be number follow by characters.</li>
  <li>The number portion always will be either one or two digits value.</li>
  </ol>
  
  <p>Is there any C# predefined function to parse the numeric value from string?</p>