SlickEdit Product Discussion > SlickEdit User Macros

Translator - muti-term search and replace

(1/1)

jporkkahtc:
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".


Navigation

[0] Message Index

Go to full version