用C#用正则如何提取出标签a中的内容
如提取<tdclass="browseEntryData"><aname='anchor_3'></a><ahref="/search~S0*chx?/twavelet/...
如提取
<td class="browseEntryData">
<a name='anchor_3'></a> <a href="/search~S0*chx?/twavelet/twavelet/1%2C61%2C64%2CB/frameset&FF=twavelet+analysis+and+its+applications&1%2C1%2C">Wavelet analysis and its applications</a>
</td>
中href的内容/search~S0*chx?/twavelet/twavelet/1%2C61%2C64%2CB/frameset&FF=twavelet+analysis+and+its+applications&1%2C1%2C
和Wavelet analysis and its applications
谢谢了!
急用 展开
<td class="browseEntryData">
<a name='anchor_3'></a> <a href="/search~S0*chx?/twavelet/twavelet/1%2C61%2C64%2CB/frameset&FF=twavelet+analysis+and+its+applications&1%2C1%2C">Wavelet analysis and its applications</a>
</td>
中href的内容/search~S0*chx?/twavelet/twavelet/1%2C61%2C64%2CB/frameset&FF=twavelet+analysis+and+its+applications&1%2C1%2C
和Wavelet analysis and its applications
谢谢了!
急用 展开
2个回答
展开全部
Chapter XIII control the destiny of life and death (two) text / water beauty
Red | sleeve | Introduction | Love | Small | say Master of Wales said: At this time, a stable woman came out sweating,moncler online shop, said: This made Cheung Ruo surprised,prada scarpe, if you exclude all doubt,tiffany uk, tell the emperor, her sister would not have died. At this time, Lafayette said: the emperor tried to stop. Xiang bamboo knees pleading: They ignore mitigation, stable woman rushed into the room. Lafayette said: Congratulations to the emperor,ugg stivali, have eight children princes! I incompetent,abercrombie and fitch, do not protect your idea. also hope to keep the child, the child now born, Chenqie the peace of mind, and also look ..... hope the emperor to take care of her children to Ruo Ruo children ...... call it the amount of ......did not finish, has dropped to a hand.
Red | sleeve | Introduction | Love | Small | say Master of Wales said: At this time, a stable woman came out sweating,moncler online shop, said: This made Cheung Ruo surprised,prada scarpe, if you exclude all doubt,tiffany uk, tell the emperor, her sister would not have died. At this time, Lafayette said: the emperor tried to stop. Xiang bamboo knees pleading: They ignore mitigation, stable woman rushed into the room. Lafayette said: Congratulations to the emperor,ugg stivali, have eight children princes! I incompetent,abercrombie and fitch, do not protect your idea. also hope to keep the child, the child now born, Chenqie the peace of mind, and also look ..... hope the emperor to take care of her children to Ruo Ruo children ...... call it the amount of ......did not finish, has dropped to a hand.
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Match mc=Regex.Match(您的数据,@"<a href=""([^>]+?)"">([^<]+?)</a>",RegexOptions.Multiline);
string href=mc.Group[1].Value;
string data=mc.Group[2].Value;
string href=mc.Group[1].Value;
string data=mc.Group[2].Value;
更多追问追答
追问
根据您的意思 ]+?)"">([^是与我想要内容的匹配表达式?
那么 Regex s = new Regex("]+?)"">([^");
if (s.IsMatch(tempstr))
{
foreach (Match item in s.Matches(tempstr))
{
tempstr = item.Groups[1].Value;
}
}
其中tempstr是我的数据
这个对吗
追答
不对。
("]+?)"">([^"这里错
foreach (Match item in s.Matches(tempstr))这里错,
直接用我上面的吧。
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询