User: firewolf -- 2012-12-25 << 1040 1042 >> |
Hits: 2947 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
Several segmented calculated for each line, if number of segments is even, followed by the "\ \" |
Input Sample: |
a txt like this: tek|ci|t gn|i|tca|ig e|ltt de|g|nahc|nu|ah |
Output Sample: |
i wanna get: $1/$2\\$3 $1/$2\\$3/$4\\ $1/$2\\ $1/$2\\$3/$4\\$5 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
1. ctrl-o open text file 2. ctrl-h open 'replace' dialogue * set 'replace unit' to 'Chars' * set 'replace scope' to 'Line' * set 'search for pattern' to: * set 'replace with pattern' to: 3. click 'replace', done. Note: following version will always add slash or backslash at the end: |
Screenshot 1: Replace_Window |
Similar Examples: |
How to change the direction of all sentences in a text file? (46%) How to batch change filename from upper case to lower case? (46%) How to change date from ddmmyy to yymmdd in multiple filenames? (45%) How to exchange column 2 and column 3 in multiple csv files? (45%) How to change each pair of single quote to parenthesis? (45%) How to change all lines to columns in a text? (44%) How to rename files to the first and last line of file contents? (44%) How to generate a list of number base on given formula such as 3n+1? (44%) |
Check Demo of Advanced search and replace |
Keywords: |
segme alt several even scalar backslash double slash calculate next replace each even line even line change the number for each add line number by line number search by number number each line add text each line |