Another quick snippet. I was using the Javascript replace method in my site when I noticed that by default it only made a singular replace. So I hunted down the solution for a global replace…

MyString.replace(/oldtext/gi, “newtext”)