@skimble Try this: ``` const regex = new RegExp(oldId, 'g'); text = text.replace(regex, newId); ```

@skimble Try this:
const regex = new RegExp(oldId, 'g');
text = text.replace(regex, newId);

I suspect your construction of the regex like that is throwing off .replace