I found a lot of questions about simple splits, but my file is similar to a csv file and some strings are between quotes and may contain commas.
Sample:
myKey,this is a string,"This is yet, another, string"
Desired output:
["myKey", "this is a string", "This is yet, another, string"]
I found a similar question but I was unable to adapt it properly:
str.split(/([^,"]+|[^,"]*)+/g)[0]
It gives me the first character of the string instead. I also tried adding ?:
after the first parenthesis like I saw, but it didn't seem to matter.