@skimble Try this: ``` const regex = new RegExp(oldId, 'g'); text = text.replace(regex, newId); ```
@skimble Try this:
I suspect your construction of the regex like that is throwing off .replace
I suspect your construction of the regex like that is throwing off .replace
