title: How to remove non-numeric from a string but retain decimal in C#
body: <p>I am using Selenium(C#) on NUnit Framework and is getting a string from UI as <strong>$4850.19</strong>. 
  I want to compare above string with the value from backend (DB) to assert they are equal. 
  I am using a below method to parse my dollar amount from front-end, but the issue is that is also stripping the decimal point; and obviously the comparison with backend is failing.</p>
  
  <p>Method used:</p>
  
  <pre><code> public static string RemoveNonNumeric(string s)
      {
          StringBuilder sb = new StringBuilder();
          for (int i = 0; i &lt; s.Length; i++)
              if (Char.IsNumber(s[i]))
                  sb.Append(s[i]);
          return sb.ToString();
      }
  </code></pre>
  
  <p>How to strip out any '$' or ',' but keep '.' in the value?</p>