页面导航: 首页网络编程正则表达式 → 正文内容

正则表达式,提取网页中的链接地址

发布:dxy 发布日期:2006-10-7 字体:[增加 减小] 类型:转载
<td class=cate width="45%" style="word-break:break-all">
      <a class=M href="http://jmfengcai.cn.alibaba.com/athena/companydetail/jmfengcai.html" onMouseDown="return aliclick(this,'?alishop=companylistcompanyname');" target="_blank" class=M>江门市蓬江区凤彩工艺厂</a>
        <br>
代码如上.我请问如何用正则表达式,把"http://jmfengcai.cn.alibaba.com/athena/companydetail/jmfengcai.html"提取出来?

/(http:\/\/\[^" ']+)/gm
/href *= *['"]*(\S+)["']* */gm
根据不同需要选择。 
浏览次数:载入中... 打印本文关闭本文返回首页

文章评论

共有 位脚本之家网友发表了评论我来说两句

同 类 文 章
最 近 更 新
热 点 排 行