title: Extract numbers from string to create digit only string
body: <p>I have been given some poorly formatted data and need to pull numbers out of strings. I'm not sure what the best way to do this is. The numbers can be any length.</p>
  
  <pre><code>string a = "557222]]&gt;";
  string b = "5100870&lt;br&gt;";
  </code></pre>
  
  <p>any idea what I can do so I'll get this:</p>
  
  <pre><code>a = "557222"
  b = "5100870"
  </code></pre>
  
  <p>Thanks</p>
  
  <p>Solution is for c# sorry. Edited the question to have that tag</p>