A little improvement to Matthew's answer could be a lookahead instead of the last capturing group:
.replace(/(\w+)(\d+)(?=\w+)/, "$1!NEW_ID!");
Or you could split on the decimal and join with your new id like this:
.split(/\d+/).join("!NEW_ID!");
Example/Benchmark here: https://codepen.io/jogai/full/oyNXBX