我有一个要求,我将从用户那里获得输入。他可以进入
"features1,feature2",feature3,"feature4"
像这样的东西。我正在使用这个
let arr: any = message.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/)
拆分字符串,我得到的结果就像
[""feature1,feature2"","feature3",""feature4""]
但我想要这样的结果
["feature1,feature2","feature3","feature4"]
子衿沉夜
相关分类