Home > Backend Development > PHP Tutorial > 关于PHP正则的有关问题

关于PHP正则的有关问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:55:29
Original
877 people have browsed it

关于PHP正则的问题
本人现在在做一个在线抓取的程序,比如现在这样的内容




个梵蒂冈

0.0%



检测完成


2014-04-0421:00:30

我想把这个内容里面的对应的内容抓取下来,其中“个梵蒂冈”这个是我提交的关键字,我这里用preg_match来实现,但是我不知道怎么就取不到值,要怎么才可以得到上面对应的内容?

我是通过模拟登陆获取页面内容
$postReturnStr=$this->postHtml("http://www.gocheck.cn/single/admin/singleCheckAction!gocheck.action",$updata, $this->wfCookieFile);
$ynmatch=preg_match('\s*'.addslashes($fileName).'\s*\s* [^\s* [\s\S]*?\s* \s*([^/i', $postReturnStr,$matchArr); 以前这样是可以的,但是现在不行了,是不是规则发生变化了?
------解决方案--------------------
.../is'
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
Latest Issues
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template