I\'m trying to do a non-greedy capture of text inside double quotation marks with regex in node.js. Most of the Google results say I should use one of these:
\"
Your regex is looking for, and matching quotes. You can do this to modify the value matched to effectively trim off the quotes.
var testStr = '|> "Song" by "Artist" on "Album" <3';
var regex = /"([^"]*)"/g; // or /"(.*?)"/g
var info = testStr.match(regex).map(function (o) {
return o.substr(1,o.length-2)
});
if (info){
console.dir(info[0]);
console.dir(info[1]);
console.dir(info[2]);
}