c#中怎么使用正则表达式匹配多个html标签内容

<td>鹏哥Csdn免积分下载器</td>
<td>V1.0</td>
<td>2014-10-23</td>
</tr>
<td>QQ靓号申请助手</td>
<td>V1.0</td>
<td>2014-10-23</td>
将里边<td>我想要的内容</td>

总共是6个匹配的内容都提取出来
我用string str1 = Regex.Match(text, @"<td>(.*?)</td>").Groups[1].Value;
string str2 = Regex.Match(text, @"<td>(.*?)</td>").Groups[2].Value;
string str3 = Regex.Match(text, @"<td>(.*?)</td>").Groups[3].Value;的方式,提取不到,请高手帮忙,谢谢了

string str = "<td>鹏哥Csdn免积分下载器</td>\r\n<td>V1.0</td>\r\n<td>2014-10-23</td>\r\n</tr>\r\n<td>QQ靓号申请助手</td>\r\n<td>V1.0</td>\r\n<td>2014-10-23</td>";
List<string> list = new List<string>();
foreach (Match m in Regex.Matches(str, @"\<td\>(.*?)\</td\>"))
    list.Add(m.Groups[1].Value);


list中就是你要的六项数据

温馨提示:答案为网友推荐,仅供参考
第1个回答  2014-10-23
string ss="/^<([a-z]+)([^<]+)*(?:>(.*)<\/\1>|\s+\/>)$/";
string str=" <td>QQ靓号申请助手</td>";
string s = Regex.Replace(str, ss, "");

相似回答