您的位置:首页 > 编程语言 > PHP开发

php preg_match 和preg_match_all

2014-02-27 22:51 274 查看
$h3=trim('【我要变强】【主流程】整体功能测试点');
$matches=array();
preg_match_all('/【(.+?)】/', $h3,$matches);

print_r($matches);

Array
(
[0] => Array
(
[0] => 【我要变强】
[1] => 【主流程】
)

[1] => Array
(
[0] => 我要变强
[1] => 主流程
)

)


http://www.5idev.com/p-php_preg_match.shtml

http://www.chinahtml.com/1007/php-127924631319354.html

/article/4831283.html

/article/1270930.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: