Post reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the last letter in the word "SlickEdit":
How many LETTERS are in the following? "a1b2c3":
Which number is missing?  "12345689":

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: patrick
« on: July 11, 2018, 01:51:23 PM »

In addition if you're running SlickEdit on linux, you can use filter-command to filter a selection through an external command.  So you could use tr directly as well. 
Posted by: jporkkahtc
« on: July 10, 2018, 11:42:15 PM »

Slick regular expressions can do this, but it is tricky to type in the expressions manually.
I have a macro that given a translation table, it constructs the regex for you.
First, create a block of text like this:
 
    abc==>def
    123==>576
 
Select those lines of text and call translateTerms.
This will populate the find-replace dialog with a Perl RE to replace all those terms on the left with those on the right.
The find&replace dialog is populated with:
    Find: "(abc)|(123)"
    Replace: "$(<1>def|<2>576)"

https://community.slickedit.com/index.php/topic,15187.msg57663.html#msg57663
Posted by: Robertre
« on: July 10, 2018, 03:28:57 PM »

Is there a function already built into VS that will effectively do for me what the Linux 'tr' command does? Basically, I have a file with a lot of character sequences (such as '%20') that I'd like to translate directly to other characters (such as ' ' in the case of '%20'). Ideally I'd like to pass two same sized arrays and say have at it. My current approach is to just keep going back to the top of the file or selection and do search and replace over and over again.
I know I could write this pretty easily, but if it's already there, I'd rather use it.
Thanks,
-Rob