JSFiddle - React, Tailwind, and code Playground
JavaScript
var pattern = /[?\[\]/\\=<>:;,'"&$#*()|~`!{}]/g;
alert("mystring is -<> ;:,'\"&%^=!{} ?[] hello ".replace(pattern, ""));
var pattern = /[?\[\]/\\=<>:;,'"&$#*()|~`!{}]/g;
alert("mystring is -<> ;:,'\"&%^=!{} ?[] hello ".replace(pattern, ""));