Regex r = new Regex(@"<smsID>(?<smsID>.*?)</smsID>");MatchCollection m = r.Matches(str);string s = "";foreach (Match ma in m){ s += ma.Groups["smsID"].Value + ",";} s = s.Substring(0, s.Length - 1);string[] strArr = s.Split(',');Regex 需要引用...