title: How to delete unneeded element in react?
body: <p>I have a function:</p>
  <pre class="lang-js prettyprint-override"><code>const validateInput = event =&gt; {
    event.target.value = event.target.value.replace(/,.e+-/g, '');
  }; 
  </code></pre>
  <p>This is the way I use the function: <code>onKeyUp={validateInput}</code></p>
  <p>It deletes unnecessary elements and deletes everything I put in the input what I don't need. How to correct it?</p>