Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Expression Selector, not a number

  • Expression Selector, not a number

  • Chris Scalzo

    August 18, 2020 at 8:27 pm

    I am trying to figure out an easy way to change formatting of all the non numbers

    eg. if I types “1.21 GIGAWATTS”, I would want to change size position and color with text animator to the gigawatts

    with text expression selector and checking if a number to apply value

    Thanks in advance.

  • Filip Vandueren

    August 18, 2020 at 8:49 pm

    This expression for your expression-selector:

    // strips all linebreaks from the string, text Animators don't count those

    if ( txt[textIndex-1].match(/[0-9\.]/) == null) {
    } else {

    (I’ve also included the period)

  • Chris Scalzo

    August 18, 2020 at 9:43 pm

    Works perfectly. I was hoping to do without regex since I don’t always wrap my head around it. I appreciate the comment as well in there. Thank you very much.

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