JSFiddle - React, Tailwind, and code Playground

HTML

<h4>Write example 2 in any textarea, ie 'some text and example 2'</h4>
<br />
<textarea id="my_ta_1"></textarea>
<textarea id="my_ta_2"></textarea>
<textarea id="my_ta_3"></textarea>

JavaScript

$(function(){
    $('[id^="my_ta_"]').on('keyup', function(){
        var txt = $(this).val();
        if(txt.match(/Example 2/i)){
            $(this).prop('disabled', 1);
        }
    });
});