const str = 'This is a string with "double-quoted substring1", and "double-quoted substring2" inside.';
const result = str.match(/("[^"]+"|[^"\s]+)/g);
console.log(result);
/*
run:
[
'This',
'is',
'a',
'string',
'with',
'"double-quoted substring1"',
',',
'and',
'"double-quoted substring2"',
'inside.'
]
*/