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++; }
Powered by: 博客园 Copyright © 2024 烈火123 Powered by .NET 8.0 on Kubernetes