Home >Backend Development >PHP Tutorial >php怎么写获取两个标签内的内容的正则表达式啊?

php怎么写获取两个标签内的内容的正则表达式啊?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:08:461530browse

<?php    $url = "http://www.xxx.com";//页面地址    $info=file_get_contents($url);//获取页面信息?>

请教,没学过php,但临时要用一下,
我要获取那个网页从


到之间的内容,但是preg_match和正则表达式我不会写。
麻烦大家了


回复讨论(解决方案)

参考

$p='#<TD align="left" colSpan="4">(.+?)</TD>#s';preg_match($p,$info,$m);echo $m[1];

参考

$p='#<TD align="left" colSpan="4">(.+?)</TD>#s';preg_match($p,$info,$m);echo $m[1];

谢谢,太谢谢了!!!1

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