JSFiddle - React, Tailwind, and code Playground JavaScript var str= '""book""'; console.log(str.replace(/["|']+/g, "'"));