Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Replace Text Expression For Correct Quotation Marks

  • Replace Text Expression For Correct Quotation Marks

  • André Otto

    November 26, 2021 at 9:19 pm

    Hi guys, I would like to have an expression that replaces wrong quotation marks set by an editor in a MOGRT used in Premiere Pro.

    In German the corect quotation marks have to look like this: „text“ (option+shift+w and option+2).

    But if you can imagine an editor can’t remember this shortcuts, they simply use shift+2 what results the symbol for inches or seconds (“).

    The difficulty (why I can’t use a simple text replace expression) is that the editor uses the same symbol twice. In front and behind the quote. But I need a result with two different symbols.

    Any ideas? My mail software on the Mac does exactly that what I want automatically.

    Is there a way in counting the wrong symbols and odd numbers result the first lower quotation mark and even numbers the upper one?

  • André Otto

    December 1, 2021 at 4:07 pm

    Just in case if someone has the same problem, here is what solved my problem very simple:

    txt = text.sourceText;

    txt.replace(/”/,”„”).replace(/”/,”“”).replace(/”/,”„”).replace(/”/,”“”).replace(/’/,”’”).replace(/’/,”’”).replace(/ß/,”ẞ”).replace(/ß/,”ẞ”).replace(/ß/,”ẞ”).replace(/ß/,”ẞ”)

    The expression replaces the wrong signs in the written order: two times for quotation marks followed by two apostrophes and four capital letter ß (what’s very common in German).

    Thats all I have to expect in my case so it will work fine hopefully.

Viewing 1 - 2 of 2 posts

Log in to reply.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy