JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="␇" />
<input type="text" value="\a" />

JavaScript

(function ($) {

    $("input").each(function (ind, elm) {

        var bell = $(this).val();
        if (/\\a/.test(bell)) {
            console.log("true");
        } else {
            console.log("false");
        }
    });

})(jQuery);