FORUMS: list search recent posts

Replace $ in text

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Yan Trudel
Replace $ in text
on Jul 7, 2017 at 4:23:59 pm

I'm looking to replace special characters in text.
I'm using the replace function but for some reason it doesn't seem to work with $ signs.

Instead, it detects the $ and adds an S at the end of the text line.

Is there a trick to make it work or maybe i'm doing this wrong?

myText = comp("Control_HUB").layer("TITRE").text.sourceText;

Return to posts index

Dan Ebberts
Re: Replace $ in text
on Jul 7, 2017 at 4:35:56 pm

I think you have to escape the $ in a regexp with a backslash. Try it this way:



Return to posts index

Yan Trudel
Re: Replace $ in text
on Jul 7, 2017 at 4:53:10 pm

Once again, you save the day!

Thanks Dan, it works perfectly now! :)

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved