Split string based on ',' and ignore split if its between '[ ]' in javascript

后端 未结 0 1781
余生分开走
余生分开走 2021-02-06 16:05

I have a string str

var str = \'h, b, c, [d, e, f], g, h, [ighg]\'

and I need to split based on \',\' and ignore if \',\' comes in between \'[ ]\'

相关标签:
回答
  • 消灭零回复
提交回复
热议问题