Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions How to highlight one word in the text?

  • How to highlight one word in the text?

  • Vasyl Iskovych

    May 28, 2020 at 1:34 pm

    Hello.
    I have a text layer with lots of text.
    I need to highlight in it, a specific word, in all places where it occurs.
    Is it possible to do this not manually, but with an expression or script?
    I would like to emphasize this word.
    But perhaps you can change its color, or some other solution.
    I hope for your help.
    Thank.

  • Andrei Popa

    May 28, 2020 at 6:28 pm

    Add a text animator.
    On the selector, add expression selector.
    Inside the expression of the expression selector write this. Modify the “asd” from row 1 with what word you want but do not remove anything else except “asd”.


    var regex = /.asd/g;
    var t = text.sourceText;
    var splitText = t.split("\r");

    function indexMatched(index){
    var matched = false;
    var match;
    while ((match = regex.exec(t)) !== null){
    matched |= match.index

    Andrei
    My Envato portfolio.

  • Vasyl Iskovych

    June 1, 2020 at 4:59 pm

    Thank you so much.
    You helped me a lot.

Viewing 1 - 3 of 3 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy