I need a regular expression that I can use in VBScript and .NET that will return only the numbers that are found in a string.
For Example any of the following \"str
The simplest solution, without a regular expression:
public string DigitsOnly(string s) { string res = ""; for (int i = 0; i < s.Length; i++) { if (Char.IsDigit(s[i])) res += s[i]; } return res; }