JSFiddle - React, Tailwind, and code Playground JavaScript var yourCase= '$okay$'; var result= yourCase.replace(/\$/g, ''); alert(result);