我需要用逗号分割字符串,但逗号不应该在方括号内。例如字符串:
'"f2140202585",true,"some, str","numeric","MegapixNum","","","0.3,16.0","0.3,16","17",2,""'
应该产生这个结果:
['"f2140202585"', 'true', '"some, str"', '"numeric"', '"MegapixNum"', '"0.3,16.0"', '"0.3,16"', '"17"', '2', '""']
我知道为此存在 preg_replace 函数,但我无法弄清楚正则表达式应该是什么。