I'm sure somebody will be able to help me on this; I'm trying to replace :) with the word smiley - The following works but only replaces the first string:
var string = "hello :)";
string = string.replace(":)", "smiley");
I tried this but it won't work:
var string = "hello :)";
string = string.replace(/:)/g, "smiley");
Any ideas?