Help in making JS node to work

Inside a JS node I have the following code:

const ex = "I am what I am.";
const kw = "am, are, to be";
const kw_split = kw.split(",");
kw_split.forEach((item, index, arr)=>arr[index]=item.trim());
const l = kw_split.length;
const y = new RegExp("(?<![aA-zZ])"+kw_split.slice(0,1),'g');
const ex_html = ex.replace(y, "REPLACEMENT");
return { result: ex_html};

It dosen’t work. The err is apparently on this part of code: const y = new RegExp("(?<![aA-zZ])"+kw_split.slice(0,1),'g');

To see the code in practice, working, access this fiddle.