title: How can i get rid of from nonnumeric values
body: <p>i want to erase all non numeric values including space,punctiation marks etc. in a string. This is bank account and i want to write it in another order only with its numbers. i tried to write some codes in c# but couldn't success. Can anyone write some basic codes for me?</p>
  
  <pre><code>    private void btn_convert_Click(object sender, EventArgs e)
      {
          ArrayList account= new ArrayList();
  
          for(int i=0 ; i&lt;textBox1.Lines.Length ; i++)
          {
              char[] str = textBox1.Lines[i].ToCharArray();
  
              for(int j=0; j&lt;str.Length; j++ )
              {
                  if ((str[j] &gt;= 0 &amp;&amp; str[j] &lt;= 9) == true)
                  {
                      account.Add(str[j]);
                  }
                  else continue;
              }
  
          }
  
          string[] newaccount= (string[])account.ToArray(typeof(string));
          label1.Text = newaccount[1];                     
  
      }
  }
  </code></pre>