-
replace characters with expression
Hey guys,
I have an expression that is supposed to replace all weird characters, spaces and enters in a text layer. It works for the spaces. However, it only seems to work for the first charachter in the sentence for the characthers I’m replacing in my expresssion. For example, I wont the letter ó to change into o. My word dwóch i pół comes out dwochipól. I tried to look for a solution but couldn’t find it. I imagine this could be a very simple fix, but sadly I’m not aware of it.
Could someone please help me with this?My code:
T1 = comp("Composition1").layer("TextLayer").text.sourceText.replace(/ /gi, "").replace(/\r/gi, "").replace("ó","o").replace("\u017C", "z").toLowerCase();Thanks in advance,
Jorge Fröberg