I have the following code, which works, but I need to inject some different stuff into the regular expression object (regex2) at runtime. However, text.replace
regex2
you can use eval to,
new RegExp( eval("/"+str+"/i") );
bye...