I'm trying to use the replace function in JavaScript and have a question.
strNewDdlVolCannRegion = strNewDdlVolCannRegion.replace(/_existing_0/gi,
"_existing_" + "newCounter");
That works.
But I need to have the "0" be a variable.
I've tried: _ + myVariable +/gi and also tried _ + 'myVariable' + /gi
Could someone lend a hand with the syntax for this, please. Thank you.