<?php
$file = file_get_contents("http://www.mywebsite.net/folder/indexhtml.asp");
preg_match_all('~<td width="23%" height="23" align="right">(.*?)</td>~is',$file, $matches5);
print implode("\n", $matches5[0]); //This prints out (Page: 889) on website ?>
我正在尝试从名为matches5变量的字符串中删除括号和带有“Number”的单词“Page”
每次我在下面使用这段代码时,它都会显示空白,这让我很困惑。请帮助我,因为我是 PHP Second 代码的新手
<?php
$file = file_get_contents("http://www.mywebsite.net/folder/indexhtml.asp");
preg_match_all('~<td width="23%" height="23" align="right">(.*?)</td>~is',$file, $matches5);
$result = preg_replace('/(?<=^| ).(?=$| )/sm', '', $matches5);
print implode("\n", $result[0]);
?>