string s="uid=aaaaaaaaaaaa</a>||||||||||||||Uid=bbbbbbbbbbbbbbbbbb</a>||||||||||||||Uid=cccccccccccccc</a>||||||||||||||Uid=dddddddddddddddd</a>";
//temp 存放匹配结果string temp="";//results 正则捕获结果集合MatchCollection results = Regex.Matches(s,"uid=(?<txt>.*?)</a>",RegexOptions.IgnoreCase);//遍历results集合foreach(Match m in results){ temp+=m.Groups["txt"].ToString()+"<br/>";//将m中命名为txt的组的捕获内容拼接到temp}//输出结果Response.Write(temp);Response.End();