【发布时间】:2014-01-17 10:42:39
【问题描述】:
我有一个在标签中搜索“href”属性的正则表达式,但目前效果不佳:
<a[^>]* href="([^"]*)"
从这里发现:
<a href="http://something" title="Development of the Python language and website">Core Development</a>
这一行:
<a href="http://something"
但我只需要找到:
http://something
【问题讨论】:
-
你能告诉我们你的python代码吗?
-
您可以尝试以下建议的 DOM 解析器之一:stackoverflow.com/questions/2782097/…
-
用户已在 12 月 27 日提出同样的问题:stackoverflow.com/questions/20802691/…