第九节:伏击(下)/BookReader/vol,2022067,5070406.aspx' target='_blank'>[分卷阅读]&l"/> 第九节:伏击(下)/BookReader/vol,2022067,5070406.aspx' target='_blank'>[分卷阅读]&l">

求一段采集正则表达式,该如何解决

WBOY
Release: 2016-06-13 13:44:42
Original
967 people have browsed it

求一段采集正则表达式
/BookReader/2022067,33765342.aspx" title='字数:2050 更新时间:2011-7-25 20:00:27'>第九节:伏击(下)
/BookReader/vol,2022067,5070406.aspx' target='_blank'>[分卷阅读]
/BookReader/vip,2022067,34167581.aspx" title='更新时间:2011-8-18 8:30:21   汤' target='_blank'>第六节:梦想大厅(上)
/BookReader/BuyVIPChapterList.aspx?BookId=2022067' target='_blank'>订阅VIP章节

从上面四行中排除 分卷阅读 和 订阅VIP章节 在余下的两行中 取出 url 和 标题

我自己找了一个 "/(\/BookReader\/.*?)[\"\'].*?>(.*?)/is"

但是连 分卷阅读 和 订阅VIP章节 也一起得到了

结果如下
[1] => /BookReader/2022067,33444589.aspx
[2] => /BookReader/BuyVIPChapterList.aspx?BookId=2022067
[3] => /BookReader/vol,2022067,5032321.aspx

[1] => 第一节:伏击(上)
[2] => 订阅VIP章节
[3] => [分卷阅读]

请指教

------解决方案--------------------
多加一个条件 title
------解决方案--------------------
一个 foreach 然后 unset 不就行了??

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template