-
Replace Text Expression
Howdy,
Problem: I am loading text dynamically from an XML file to write credits for several artists using a script. When I pull the data into AE it keeps introducing a string of escaped code. I can’t seem to solve the broken code, but the string it dumps in is always the same, its a unicode value.
Solution(i think): attach an expression to search for the escaped code in Source Text. Replace the unicode with another string of text using if/else.
Questions: Here is loosely what I imagined using. How do I make it search and find just the one string?
if (text.sourceText = “\xyz”) text.sourceText = “replaced” else (text.sourceText);
right now this code would return “replaced” regardless of what is in the source text. So its totally broken. I understand why, but I don’t know how to tell it to find just one string in sourceText. Please help!
Thanks in advance. This forum has helped me so many times!