-
Using Expression to Check Text String Match
So, a Text Layer, “Layer Text” has the following Text String –
Comprehensive Meals
TODAY ONLYWhen checking if the string has changed, in another layer, I’ve got this Expression –
const a = thisComp.layer(“Layer Text”).text.sourceText;
if(a == “Comprehensive Meals” + “\n” + “TODAY ONLY”) {“YES”} else {“NO”}
I should be getting a result of YES but instead I’m getting a NO. Why?
I’ve done this ages ago but I seem to have forgotten something critical.
TIA