I have a string like this
const str = "'a' 'b' 'c'"
I want to split it and get in result array of strings
const arr = str.split(" ")
but in output I get:
["'a'", "'b'", "'c'"]
How can I get in output array without nested strings?
Desired result
["a", "b", "c"]
'character? For example["'doesn\'t' 'abc' 'mustn\'t'"]Array.from(text.matchAll(/'([^']+)'/g), m => m[1])Array.from(text.matchAll(/'([^'\\]*(?:\\.[^'\\]*)*)'/gs), m => m[1])