Apply text formatting to select words

How would I go about applying the following text format only to the word ‘the’ (regardless of caSe) in my textfield?

my_txt.text = 'The cat jumped over the house.'

/// my format I want to apply
with (_light_S_fmt) {
                align = 'left';
                blockIndent = 0;
                bold = false;
                bullet = false;
                color = _green;
                font = FontNames.ARIAL;
                indent = 0;
                italic = false;
                kerning = false;
                leading = 0;
                leftMargin = 0;
                letterSpacing = 0;
                rightMargin = 0;
                size = 14;
                tabStops = [];
                target = "";
                underline = false;
                url = "";
            }