JSFiddle - React, Tailwind, and code Playground

JavaScript

var s="adbc\sjhf\fkjfh\af";
s = s.replace(/\\/g,'-');
alert(s);