I have a string from which I need to extract specific texts
let str = 'id = "Test This is" id ="second" abc 123 id ="third-123"';
let res = str.match(/[^id ="\[](.*)[^\]]/g);
console.log(res);
I want the texts in ids only ['Test This is','second','third-123']
But I am getting [ 'Test This is" id ="second" abc 123 id ="third-123"' ]
The whole text after first id which I don't want.I need help with the pattern.