时间:2021-07-01 10:21:17 帮助过:2人阅读
$s=<<[email protected]
$s =<<< TXT
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
TXT;
//方案一
preg_match_all('/^(?!13
------解决方案--------------------
15
------解决方案--------------------
18).*/m', $s, $r);
print_r($r);
//方案二
echo preg_replace('/^(13
------解决方案--------------------
15
------解决方案--------------------
18).*?/m', '', $s);
Array
(
[0] => Array
(
[0] => [email protected]
[1] => [email protected]
[2] => [email protected]
[3] => [email protected]
[4] => [email protected]
[5] => [email protected]
[6] => [email protected]
)
)
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]