Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Parse a specific line of text

  • Tomas Bumbulevičius

    February 11, 2022 at 11:02 am

    Hey Jeremy, splitting the text by return carriage and picking the line from array.

    var myString = “This is \n some example \n text”;
    var splitArray = myString.split(“\n”);

    splitArray makes your string as [“This is”, “some example”, “text”]

    If you know exactly which line is required, then accessing it by splitArray[X] will do it.

    Where X – index of line in an array (keep in mind arrays starts from 0, not 1)

    So in your given example line2 would be splitArray[1]

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