JSFiddle - React, Tailwind, and code Playground

by Danja Wittmann

HTML

<input type="text" id="str">
<input type="submit" id="go" value="Go">
<div>
<input type="text" id="area">
</div>

JavaScript

document.getElementById("go").onclick = function() 
{
	var str = document.getElementById("str").value
  var re = /[^\w*]/g
  var done = str.replace(re,"");
  document.getElementById("area").value = done;
}