I have a string like this:
"foo", "bar", "baz"
I want, with a regex, get the single string;
["foo", "bar", "baz"]
This is my code:
var re = new RegExp('"(?:[^"])*"', 'g');
var match = re.exec('"foo", "bar", "baz"');
console.log(match);
but doesn't check for the separator ,
and return only foo
...