Regular expression for remove html links

Possible Duplicate:
Regular expression for parsing links from a webpage?
RegEx match open tags except XHTML self-contained tags

i need a regular expression to strip html <a> tags , here is sample:

<a href="xxxx" class="yyy" title="zzz" ...> link </a>

should be converted to

 link

我认为你正在寻找: </?a(|s+[^>]+)>


Answers given above would match valid html tags such as <abbr> or <address> or <applet> and strip them out erroneously. A better regex to match only anchor tags would be

</?a(?:(?= )[^>]*)?>

以下是我将使用的内容:

</?ab[^>]*>

链接地址: http://www.djcxy.com/p/76848.html

上一篇: 正则表达式的HTML

下一篇: 删除html链接的正则表达式