JSFiddle - React, Tailwind, and code Playground JavaScript var string = '**blah*'; string = string.replace('*', 'text').replace('*', 'word');