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

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

WBOY
WBOYOriginal
2016-06-13 13:13:42773browse

正则在软件中通过,但是在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';
}

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

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