JSFiddle - React, Tailwind, and code Playground JavaScript text = "a'b'c'"; document.write(text.replace(/'/g,"%%"));