You can try like that
using System.Text.RegularExpressions;
string s = "100S,200Mg,5Yrs";
Regex r = new Regex("[a-zA-Z]");
s = r.Replace(s, "");
output would be
100,200,5
I am just replacing all the charcters with space, if you have some other char then create your own RegEx.