Examples for https://www.dannyguo.com/blog/how-to-replace-all-instances-of-a-substring-in-javascript/