Author Topic: Translator - muti-term search and replace  (Read 3241 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Translator - muti-term search and replace
« on: September 29, 2020, 07:40:42 PM »
This macro setups a complex RE to translate between terms
 
First, create a block of text like this:
 
    abc==>def
    123==>576
 
Select those lines of text and call translateTerms().
This will populate the gui-replace dialog with a Perl RE to replace all those terms on the left with those on the right.
 
It is possible to swap terms like this:
    abc==>def
    def==>abc

All existing instances of "abc" are replaced with "def", while existing instances of "def" are replaced with "abc".


« Last Edit: September 29, 2020, 07:42:34 PM by jporkkahtc »