Here is a method that will extract all of the numbers from a string.
It works well.PHP Code:private string ExtractNumbers(string Expression)
{
string result = null;
char Letter;
for (int i = 0; i < Expression.Length; i++)
{
Letter = Convert.ToChar(Expression.Substring(i, 1));
if (Char.IsNumber(Letter))
{
result += Letter.ToString();
}
}
// MessageBox.Show(result);
return result;
}
-Sir Loin




Reply With Quote