# Apply text formatting to select words

**URL:** <https://forum.kirupa.com/t/apply-text-formatting-to-select-words/323742>\
**Category:** flash\
**Created:** [July 14, 2011, 8:03pm UTC](https://forum.kirupa.com/t/apply-text-formatting-to-select-words/323742 "2011-07-14T20:03:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![vsiege](https://avatars.discourse-cdn.com/v4/letter/v/db5fbb/32.png) [@vsiege](https://forum.kirupa.com/u/vsiege)\
**Post date:** [July 14, 2011, 8:03pm UTC](https://forum.kirupa.com/t/apply-text-formatting-to-select-words/323742/1 "2011-07-14T20:03:46Z")

</div>

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

```auto
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 = "";
            }

```
