-
Replace $ in text
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;
myText.replace(/q|ç|ä|à|é|è|ê|ë|ô|ö|ü|ù/g,"e").replace(/,|;|ï|î/g,"i").replace(/$/g,"s");