I can&#039;t seem to find the answer on the following.<BR><BR>Problem:<BR>I want to use a RegExp to replace a value in a string. All goes well... Now I want to globally change that value in a string.<BR>str.replace (/value/gi, "otherval");<BR><BR>Now I want to use a variable as value (this must be done because I pull it from the db)<BR><BR>so, str.replace (variable, "otherval");<BR><BR>But How can can I globally change that value in the string? Problem is that with the methode above (with the variable instead of a string) it will only replace the first one... How can I add the /gi parameter?<BR><BR>I&#039;m going nuts... It must be VERY simpel, and I will feel VERY stupid ;-)<BR>