title: c# remove strings from an array
body: <p>How can i remove any strings from an array and have only integers instead</p>
  
  <pre><code>string[] result = col["uncheckedFoods"].Split(',');
  </code></pre>
  
  <p><strong>I have</strong></p>
  
  <pre><code>[0] = on;      // remove this string
  [1] = 22;
  [2] = 23;
  [3] = off;      // remove this string
  [4] = 24;
  </code></pre>
  
  <p><strong>I want</strong></p>
  
  <pre><code>[0] = 22;
  [1] = 23;
  [2] = 24;
  </code></pre>
  
  <p><strong>I tried</strong></p>
  
  <pre><code>var commaSepratedID = string.Join(",", result);
  
  var data = Regex.Replace(commaSepratedID, "[^,0-9]+", string.Empty);
  </code></pre>
  
  <p>But there is a comma before first element, is there any better way to remove strings ?</p>