I'm having some problems concatenating strings in TypeScript. My code is
const str = 'my string';
if(regex1.match(str)) {
const replaced = str.replace(regex1, '');
console.log(replaced + '.ts')
}
The problem is in the string concatenation, Node outputs
.tsreplaced
Instead of
replaced.ts
It only happens with that string. Other string concatenations work fine.