Replacing values inside TICKscript

We have a scenario in our use case where we need to find and replace .id(myCustomName) from deadman alert node inside TICKscript. For example, I need to prefix with a string such as ‘dev’ or ‘test’ before the variable name ‘myCustomName’, thereby ‘id’ value becomes (‘dev’ + myCustomName).

Are there parsers available which we can make use of here to replace?

Any suggestions or ideas are most welcome.