Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

496.Advanced search and replace -- How to do simple encryption of a text file by letter to letter remapping?

User: editor -- 2010-05-03
Hits: 72
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to do simple encryption of a text file by letter to letter remapping?

I need to encryt one of my text file by following rules:
replace A-L(or a-l) with O-Z(or o-z) repectively, replace M-Z(or m-z) with A-N(or a-n) repectively.

After that, I can change the file back to original text with reversed mapping rules.
Input Sample:
This is a text before encryption.
Output Sample:
Hvwg wg o hslh pstcfs sbqfmdhwcb.
Answer:
Hint: You need to Download and install "Replace Pioneer" to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open replace dialog
* in 'replace with pattern', enter:

3. click 'Replace', done!
4. ctrl-s save to file.

Note:
* Above operation need version 2.54 at least, for the early version, you can use following expression in step 2:

* To change the text back, you just need do similar operation above, only change the expression in step 2 to:

Download Script:  scripts/496.rst.zip

Similar Examples:
How to split text file by number of bytes? (53%)
How to sort the lines in a text files by the order of line length? (51%)
How to detect encoding type of a text file automatically? (51%)
How to merge 3 text files by getting one line from each file repeatly? (50%)
How to sort all the lines of a text file by order the multiple columns? (50%)
How to sort the text file by the date at the beginning of each line? (50%)
How to parse data from the text file and create text with  user specified format? (50%)
How to search specified pattern in a text file and remove spaces in it? (49%)

Check Demo of Advanced search and replace