<?php$pattern = '/[;,]/';$string = "something here ; and there, oh,that's all!";echo '<pre>', print_r( preg_split( $pattern, $string ), 1 ), '</pre>';
对更新问题的更新答案:
<?php$pattern = '/[x{ff0c},]/u';//$string = "something here ; and there, oh,that's all!";$string = 'hei,nihao,a ';echo '<pre>', print_r( preg_split( $pattern, $string ), 1 ), '</pre>';
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)