JSFiddle - React, Tailwind, and code Playground

HTML

<textarea id="field"></textarea>

JavaScript

$('#field').keypress(function(){
    var str = $(this).prop('value');
    if(str.match(/brasil/i)){
        $(this).css('color','blue');
    }else if(str.match(/quero/i)){
        $(this).css('color','green');
    }
});