Here's what I came up with:
// Finds starting and ending positions of quoted text_x000D_
// in double or single quotes with escape char support like \" \'_x000D_
var str = "this is a \"quoted\" string as you can 'read'";_x000D_
_x000D_
var patt = /'((?:\\.|[^'])*)'|"((?:\\.|[^"])*)"/igm;_x000D_
_x000D_
while (match = patt.exec(str)) {_x000D_
console.log(match.index + ' ' + patt.lastIndex);_x000D_
}
_x000D_