$str='11111111111111 <!-- -->想要的内容 <!--End of Insertion -->2222222222222222';
$p='/>(.*)</';
preg_match($p,$str,$m);
echo $m[1];//$m[1] 是想要的内容
解决方案 »
- 找熟悉PHP的兼职人员
- PHP能选择下拉框或者文本框失去焦点后进行MYSQL查询吗?
- 新手求助,关于析构函数的
- 不是高手的不要进来
- Fatal error: Call to a member function query() on a non-object in G:\wamp\apache
- 请问怎么样正确的减少读文件的资源
- 请教关于采集的致命问题:为何cpu占用居高不下?
- 一段程序高手帮我看看什么意思??
- 为什么显示传回的信息是:underfined
- 大侠,到哪儿找这个东东:MSSQL DB-Libraries
- 关于Cannot add header information - headers already sent...”。
- 帮忙看看,这样写有错么?
$str='11111111111111 <!-- -->想要的内容 <!--End of Insertion -->2222222222222222';
$p='/>(.*)</';
preg_match($p,$str,$m);
echo $m[1];//$m[1] 是想要的内容
$str='11111111111111 <!-- -->想要的内容 <!--End of Insertion -->2222222222222222';
$result=strstr(substr($str,0,strrpos($str,">")+1),'<');
echo $result;