请问这个正则匹配规则是怎没回事?明明写对了但是测试出来的结果还是错误
想解析新浪的视频。多页管理里通过以上正则匹配规则来解析
比如吧 解析
http://video.sina.com.cn/v/b/44930990-1622669611.html
得出的结果应该是
http://v.iask.com/v_play.php?vid=44930990-1622669611.xml
但是现在解析出来却是
http://v.iask.com/v_play.php?vid=78674901-1622669611.xml
很奇怪这个78674901怎么出来的???
有人能我看看吗?
<div class="news n1" id="RUserListOne">
最新上传:<a href="http://video.sina.com.cn/v/b/78674901-1622669611.html" title="因为爱情 爸爸和3岁女儿">因为爱情 爸爸和3岁女儿</a>
</div>
因为你采集的源代码里显示的这个 这个哦,所以匹配到 http://v.iask.com/v_play.php?vid=78674901-1622669611.xml这个网址
这样设置试试http://video.sina.com.cn/v/b/(.*?).htmlhttp://v.iask.com/v_play.php?vid=$1.xml 可以了谢谢,为什么我之前用的正则匹配它会把源码里的那串XML匹配出来呀?
页:
[1]