title: How to convert a string with comma to integer in C#
body: <p>For example I have a string "<code>99,999 ABC XYZ</code>"
  Now I want to convert to integer "<code>99999</code>"</p>
  
  <p>I have made a code that worked:</p>
  
  <pre><code> var regex = new Regex("[A-z]");
   linksOnPage = regex.Replace(linksOnPage, "");
  
   regex = new Regex(" ");
   linksOnPage = regex.Replace(linksOnPage, "");
  
   int noPage = int.Parse(regex.Replace(linksOnPage, ""), 
                          NumberStyles.AllowThousands);
  </code></pre>
  
  <p>But I feel it's not good enough, can anyone help me to make it shorter?</p>