//提取数字 public static IList<int> GetNumberic(string str) { IList<int> numbericList=new List<int>(); MatchCollection ms = Regex.Matches(str, @"d+"); foreach(Match m in ms) { numbericList.Add(m.Value); } return numbericList; } //提取字母 public static IList<string> GetStrings(string str) { IList<string> strList=new List<string>(); MatchCollection ms = Regex.Matches(str, @"D+"); foreach(Match m in ms) { strList.Add(m.Value); } return strList; }