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

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

WBOY
WBOYOriginal
2016-06-13 12:05:15776browse

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

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

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

第一个问题的正则式是:

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

第二个问题太多,还在看

Statement:
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