Home > Backend Development > PHP Tutorial > 正则在软件中通过,但是在php中不可用,怎么解决

正则在软件中通过,但是在php中不可用,怎么解决

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

正则在软件中通过,但是在php中不可用,如何解决

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><?php //$code=file_get_contents('http://wvw.ranwen.com/info_24983.html');
$code=file_get_contents('http://wvw.ranwen.com/info_41974.html');
if (preg_match('/<div id="CrbsSum">.*<br>\s*((.|\n)+?)/i', $code,$tmp)){
    print_r($tmp);
}else{
    echo 'wasd';
}
Copy after login

如上代码 注释第一个链接使用第二个的时候无法使用,但是当注释第二个使用第一个的时候可以,求助这是什么原因

------解决方案--------------------
在我这运行,看他们的运行效果都是一样的。貌似没有差别。
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