// Define the string
let str = 'This is a string with "double-quoted substring-1", and "double-quoted substring-2" inside.';
// Regular expression pattern to match substrings within double quotes
let pattern = /"([^"]*)"/g;
// Find all matches
let matches = [...str.matchAll(pattern)].map(match => match[1]);
console.log(matches);
/*
run:
[ 'double-quoted substring-1', 'double-quoted substring-2' ]
*/