string sttr = "123addyou恩啊1a"; MatchCollection coll = Regex.Matches(sttr, @"[a-z]|\d"); foreach (Match m in coll) { Console.WriteLine(m.ToString()); }
Matches()方法匹配符合子字符串集合
这里匹配单个数字或者是a-z的字母