const regex = /This.*/igm;
// Alternative syntax using RegExp constructor
// const regex = new RegExp('This.*', 'igm')
const str = `\\u0000Sp?\\u0002\\u0001A\\u0000Sr?)\\u0004£\\u000Ex-opt-jms-destQ\\u0001£\\u0012x-opt-jms-msg-typeQ\\u0005\\u0000Ss?\\u0000\\u0000\\u0000W\\u0000\\u0000\\u0000\\n¡0ID:06ecf56f-d295-4458-a981-d5badbb5b1a7:1:1:1-95@¡\\u000Ftopic://MyTopic@@@@@@\\u0083\\u0000\\u0000\\u0001m^£\\u0019\\u0087\\u0000Sw¡9&This is a test message sent out at 2019-09-23 17:00:10 PM`;
const subst = ``;
// The substituted value will be contained in the result variable
const result = str.replace(regex, subst);
console.log('Substitution result: ', result);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions