Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Write Text from Character X to Character Y

  • Write Text from Character X to Character Y

    Posted by Christopher Bly on March 14, 2018 at 5:41 pm

    I’m fairly sure there’s a pretty simple expression for this, but I can’t remember it and hopefully someone can jog my memory. I’m looking for an expression that only writes part of a string of text, from character X to character Y.
    Example: If I have a text layer with the source text “Expression”, but I only want it to write starting at the 3rd character and ending at the 9th, so it would come out “pressi”.
    Anyone have an idea of how this is done?

    Dan Ebberts
    replied 8 years, 1 month ago
    2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    March 14, 2018 at 5:53 pm

    Either of these should work:

    value.substr(2,6) // first character, how many

    value.substring(2,8) // first character, last character

    Dan

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