我有这个标签结构:如何从href获得标题?
<td class="team team-a "><a href="/teams/austria/sportverein-mattersburg/163/" title="Mattersburg">Mattersburg</a></td>
我试图让title
属性与此正则表达式:
return Regex.Replace(href, "<a[^>]*?title=\"([^\"]*?\"[^>]*?>", "");
其中href
变量是内容<td>
,似乎正则表达式失败,为什么?
你只是缺少一个闭括号。 – horcrux