如何从html中提取url地址
诸如
"<a href="/content/content.php?p=2_5_3" target="_self">??????è?????</a></dd>
<a href="/content/content.php?p=2_5_3" target="_self">??????è?????</a></dd>
......"
之类
变为
“/content/content.php?p=2_5_3
/content/content.php?p=2_5_3
......"
正则表达式 html url
[解决办法]
用jquery获取 doc的元素
[解决办法]
String str=""<a href="/content/content.php?p=2_5_3" target="_self">";
System.out.println(str);
Matcher m = Pattern.compile(""<a href="(.*?)" ").matcher(str);
while(m.find()){
System.out.println(m.group(1));
}