使用以下字符串:
$str = '["one","two"],a,["three","four"],a,,a,["five","six"]';
preg_split( delimiter pattern, $str );
我将如何设置分隔符模式才能获得此结果:
$arr[0] = '["one","two"]';
$arr[1] = '["three","four"]';
$arr[2] = '["five","six"]';
换句话说,有没有办法在模式 ',a,' AND ',a,,a,' 但首先检查 ',a,,a,' 进行拆分,因为 ',a,' 是',一个,,一个,'?
提前致谢!