JSFiddle - React, Tailwind, and code Playground

HTML

<input id="TheBox" type="text">

JavaScript

function Start() {
    
    $('#TheBox').keyup(function () {
       
        var TheInput = $('#TheBox').val();      
        var TheCleanInput = TheInput.replace(/([.\p{L}])/g, '');

        $('#TheBox').val(TheCleanInput);
    });
}

$(Start);