//输入要匹配的内容和正则表达式规则 返来单个匹配的内容 public string RegMatchContent(string str,string reg) { Match m = Regex.Match(str, reg); List<string> list = new List<string>(); if (m.Success) { return m.Value; } else { return ""; } }