I know that this will extract the number and store as int -
string inputData = \"sometex10\"; string data = System.Text.RegularExpressions.Regex.Match(inputDa
You can use a LINQ one-liner:
var numbers = Regex.Matches(inputData, @"\d+").Select(m => int.Parse(m.Value)).ToList();
Or use ToArray() if you prefer an array instead of a list.
ToArray()