JSFiddle - React, Tailwind, and code Playground

JavaScript

var string = "Exampl$e o$f ! some#% st%ing.";
$('body').html(string.replace(/[^a-z0-9\s]/gi, '').replace(/[_\s]/g, ' '));