Menu
is it possible to use a global replace with a variable?
[code]
str.replace(/hello/g,’goodbye’) works fine
str.replace(var A,’goodbye’) works fine
str.replace(var A /g,’goodbye’) gives “g” is undefined
I have tried multiple ways and cannot seem to get it to work globaly… any ideas?