时间:2021-07-01 10:21:17 帮助过:3人阅读
preg_match('//i', $str, $matches)
$str=<<]*>/',$str,$matches); print_r($matches[2]);
------解决方案--------------------
PHP code
$str=<<------解决方案--------------------
PHP code
[User:root Time:14:14:52 Path:/home/liangdong/php]$ php preg.php Array ( [0] => Array ( [0] => Array ( [0] => " [1] => ' [2] => ) [2] => Array ( [0] => http://www.baidu.com/ [1] => http://www.baidu.com/ [2] => http://www.baidu.com/ ) ) [User:root Time:14:14:53 Path:/home/liangdong/php]$ cat preg.php