php正则表达式匹配分隔符?
<?php //php正则用任意分隔符(" " "," "/" "!")分割字符串成数组$str = "Hello world!Hello,world!Hello/world";$str = preg_split("/[\s,\/!]+/", $str);echo '<pre>';print_r($str);?>
运行输出为:Array( [0] => Hello [1] => world [2] => Hello [3] => world [4] => Hello [5] => world)希望对你有所帮助。