Это выражение, скорее всего, сделает это:
".+?"(.+?)".+?"
, и наши желаемые выходы находятся в этой группе захвата:
(.+?)
const regex = /".+?"(.+?)".+?"/gm;
const str = `,"blabla "test1" blabla", "another text"
,"blabla "test2" blabla", "another text"`;
let m;
while ((m = regex.exec(str)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
if (m.index === regex.lastIndex) {
regex.lastIndex++;
}
// The result can be accessed through the `m`-variable.
m.forEach((match, groupIndex) => {
console.log(`Found match, group ${groupIndex}: ${match}`);
});
}