【发布时间】:2010-01-12 20:07:21
【问题描述】:
我的问题和这里的类似:
Regular expression on Yahoo! pipes
我通过friendfeed 将我的gmail 状态连接到twitter,但不幸的是,他们截断了链接文本,并且我的链接一旦进入twitter 就无法正常工作。我需要能够接受这个:
<div style="margin-top:2px;color:black;">/good jquery tips
<a rel="nofollow" style="text-decoration:none;color:#00c;" target="_blank" href="http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/" title="http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/">
http://james.padolsey.com/javascr...
</a>
</div>
并将截断的链接替换为 href 属性,如下所示:
<div style="margin-top:2px;color:black;">/good jquery tips
<a rel="nofollow" style="text-decoration:none;color:#00c;" target="_blank" href="http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/" title="http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/">
http://james.padolsey.com/javascript/things-you-may-not-know-about-jquery/
</a>
</div>
感谢您的帮助!
【问题讨论】:
-
不要用正则表达式stackoverflow.com/questions/1732348/…解析html
标签: regex yahoo-pipes