Closed katyapavlenko closed 4 years ago
I tried to use something like
replace({ files: __dirname + '/**/*.ts', from: new RegExp(`` + oldFileName + `(['"])`, 'gi'), to: oldFileName + $1 })
but it results not using regexp memory, and $1 is inserted as a string. Is there a way to use regexp remember features?
This is probably what you're after: https://github.com/adamreisnz/replace-in-file#using-callbacks-for-to
I tried to use something like
but it results not using regexp memory, and $1 is inserted as a string. Is there a way to use regexp remember features?