【发布时间】:2012-04-04 13:39:13
【问题描述】:
我正在尝试从 HTML 中提取链接。我正在使用以下正则表达式
href=\"([^\"]*)\"
这是提取不必要的链接。如何编写正则表达式以仅提取具有 class="l" 之类的链接
<a href="http://users.elite.net/runner/jennifers/hello.htm" class="l">
<a href="http://www.hellodesign.com/" class="l">
<a href="http://www.ipl.org/div/hello/" class="l">
【问题讨论】:
标签: java regex html-parsing