I am using a regex as shown below
const regex = /^.*?\*AUY:(.*?)$/gmi;
I am trying to pass the string AUY as a variable . I have tried doing the following but it gives an error of incorrect Regular Expression
var strreg="^.*?\*"+ID+":(.*?)$";
const regex = new RegExp(strreg,"gmi");