string sentence = \"X10 cats, Y20 dogs, 40 fish and 1 programmer.\"; string[] digits = Regex.Split (sentence, @\"\\D+\");
for this code i get val
try
Regex.Split (sentence, @"[^0-9\.]+")