RE: Replace() Help
it creates a RegExp object for the replace function
although a better way would be to do this in the for loop
var RegEx = new RegExp(myCode[i][0],"g");
tmpMessage = tmpMessage.replace(RegEx,myCode[i][1]);
so you don't need to make a new RegExp object for each array value.
|