JSFiddle - React, Tailwind, and code Playground

by Jill Singer

HTML

<input type="text" class="testinput" id="ackInput"/>
<button id="testButton">test me!</button>
<span id="errorTestInputAllowedChars"></span>  

<P>
    this string here included to paste it into the field for testing:<P>
    <span id="ackack"> &dagger;ack! hark!</span>

JavaScript

var tester = /^[^\u0000-\u001F\u0080-\u00A1]+$/i;

var tester2 = /^[^\x00-\x1f\x80-\xa1]+$/;
    $('#testButton').click(function(){
        var text1 = $('#ackInput').val();
        console.log("text: " + text1);
        var allowed  = tester2.test(text1);
        var feedback = "allowed?" + allowed;
        console.log(feedback);
        $('#errorTestInputAllowedChars').text(feedback);
    });