-
Split text at irregular intervals
Is there a way to use the split function to cover more than one element in the array?
For example, I have a series of headlines that I need to break in two lines, in some cases the first two words go on the top and the third word goes on the bottom but other times is the other way around. I’ve been using the following expression:
thisComp.name.split("_")[1]
(for the bottom line) and then I just change the position of "_" on the comp name after I duplicate it but I would like to see if there's a way to avoid that step and instead have an expression that covers the first and second words automatically, I tried [0,1] but it only grabs the 2nd part of the array.
Thanks in advance for your help.