Javascript add string variable to response

Problem

So I have this response for a node.js program I'm using

'Content-Disposition': 'attachment; filename="tts.mp3"'

Instead of tts.mp3 I have a variable called textToConvert. How can I add textToConvert.slice(0,10), and add .mp3 to the end of it to have that as the name of the mp3 file instead of tts.mp3?

Thanks in advance

Problem courtesy of: Ostap Hnatyuk

Solution

'Content-Disposition': 'attachment; filename="' + textToConvert.slice(0, 10) + '.mp3"'
Solution courtesy of: Dogbert

Discussion

newResponse = response.replace(
    /(filename=")(\w+\.mp3)(")/, '$1' + textToConvert.slice(0, 10) + '.mp3$3');
Discussion courtesy of: mVChr

This recipe can be found in it's original form on Stack Over Flow.