JSFiddle - React, Tailwind, and code Playground

by ashraf_sabry_m

HTML

<textarea id="txt" cols="40" rows="20"></textarea> <button onclick="replaceAccents()">نفذ</button>

JavaScript

function replaceAccents()
{
    var elem;
    var text = (elem = document.getElementById("txt")).value;
    elem.value = text.replace(new RegExp(String.fromCharCode(1617, 124, 1614, 124, 1611, 124, 1615, 124, 1612, 124, 1616, 124, 1613, 124, 1618), "g"), "");
}