Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Expression request – Line break if “. ” found in source text

  • Expression request – Line break if “. ” found in source text

  • Avinash Ramanath

    March 27, 2021 at 1:03 am

    Hi,

    Im looking for a way to break the line if “. ” found in the source text

    For example – line1. line2. line 3 should be printed as

    line1

    line 2

    line3

    Note: I’m getting the source text for this layer from another later. I’m trying this currently

    thisText = thisComp.layer(“Text from here”).text.sourceText.replace(“. “,”/r”);

  • Chris Voelz

    March 27, 2021 at 1:22 am

    This uses a csv to drive the source text, but I’m sure you can use this to get started.

    src = footage(“your footage layer name”).datavalue([1,1])

    src.replace(“. ” , “.” + “\r” + “\r”)

  • Fabrice Leconte

    March 27, 2021 at 12:35 pm

    Simply use:

    text.sourceText.split('. ').join('\r');
  • Avinash Ramanath

    April 6, 2021 at 5:03 am

    Thanks

Viewing 1 - 4 of 4 posts

Log in to reply.

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