There is a unique string generated from an external data source that I cannot manage. The system above me necessitates the IDs to adhere to this rule: "Field names should start with a letter and can solely consist of letters, numbers, or underscores ('_')".
In Typescript/Javascript (maybe utilizing lodash), what approach can be used to substitute all non-letter/digit/underscore characters in the string with an underscore?