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 amHi,
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 amThis 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 pmSimply use:
text.sourceText.split('. ').join('\r');
-
Avinash Ramanath
April 6, 2021 at 5:03 amThanks
Viewing 1 - 4 of 4 posts
Log in to reply.