string[] namelist = null; Regex r = new Regex("/">(//b//w{3,6}//b)</a>");//匹配3-6个字母或者汉字 MatchCollection m = r.Matches(str); namelist = new string[m.Count]; int i = 0; foreach (Match math in m) { namelist[i] = math.Groups[1].Value; i++; }
博客园 © 2004-2025 浙公网安备 33010602011771号 浙ICP备2021040463号-3