JSFiddle - React, Tailwind, and code Playground

by thvinic

HTML

<input type="text" id="macaddress" value="R$ 14,99" />

JavaScript

function removeChar() {
  var a = document.getElementById("macaddress").value;
a.replace(/[^a-zA-Z0-9]/g, '');
  document.getElementById.innerHTML = a;
}