-
Find specific characters in text and apply position offset
Hi everyone,
I’m trying to do a basic thing but can’t find how.
I want to scan a text layer for specific characters like p, q, j, y and then apply an offset position if one of them is present.
For now I found an expression that works very well for one character but I am not able to tell it to search for multiple ones.
var txt = thisComp.layer("WORDING").text.sourceText; var myChar = "w"; var yOffset= txt.includes(myChar) ? 15 : 0; value + [0, yOffset];
I tried every syntax where the “w” is in the myChar variable but can’t seem to make it work.