Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

Replace Text Expression

Cow Forums : Adobe After Effects Expressions
VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


cow
Replace Text Expression
by matthew tully on Jul 23, 2008 at 3:16:42 pm

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!


Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:


Related Threads:
find and replace text within expressions?

Related Tags:
IO



Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:



Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Please post Expressions Code in the box below:


Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]