如何使用Regex获得“innerHTML”?

时间:2012-09-23 21:22:53

标签: c# html regex html-parsing

  

可能重复:
  RegEx match open tags except XHTML self-contained tags

<a href="http://abc.com/abc.htm" style="color:#005F9A;">I need it</a>

我怎样才能得到“我需要它”的句子?我想使用正则表达式...

1 个答案:

答案 0 :(得分:1)

以下是可用于提取所需内容的正则表达式模式:

(?<=\<a\shref=.*?\>).*?(?=\<\/a\>)