Home > Backend Development > PHP Tutorial > 正则采集有关问题,求大神帮忙

正则采集有关问题,求大神帮忙

WBOY
Release: 2016-06-13 12:05:15
Original
835 people have browsed it

正则采集问题,求大神帮忙,在线等
目标页http://www.weather.com.cn/weather1d/101070101.shtml
想得到的值
1. 页面源码第448行,

<p class="updataTime">2014-08-23 07:30更新</p>
Copy after login
的html标签内的值
2. 第586行至730行之间的数据,(哪一天,多少号,天气情况,最高温度与最低温度,风向与风力)一共是7天的数据 

求大神帮忙,正则实在是不会写
------解决方案--------------------
可以用PHPQuery,用法类似JQuery
------解决方案--------------------

第一个问题的正则式是:

\d{4}-\d{2}-\d{2} \d{2}:\d{2}更新

第二个问题太多,还在看

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