I used the example you provided in regex101 and did a generate code in javascript and got:
const regex = /(?<=value: \')(.*)(?=\', domain)/gm;
const str = `{ cookies: [ { name: 'XX_234_132', value: 'FER_JKO_gvbhnjmk3223gbhnj', domain: 'domain.somepath.com' } ] }`;
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}`);
});
}