Column Exchange - Advanced Search and Replace
Example
Reverse order the 2,3,4,5 words of each line.
Procedures:
1) ctrl-o open source text file
2) ctrl-h open 'replace' dialog
3) set 'Replace Unit' to 'Line'
4) set 'Replace with pattern' to '$match[1,5,4,3,2,6..]'
5) click 'Replace', the column 1,2,3,4,5,6 will be changed to 1,5,4,3,2,6
Line Merge - Advanced Search and Replace
Example
Join every 3 lines into one line
Procedures:
1) ctrl-o open source text file
2) ctrl-h open 'replace' dialog
3) set 'Unit number filter' to '!3<3>'
4) set 'Search for pattern' to '\n'(\n means newline)
5) set 'Replace with pattern' to nothing
6) click 'Replace', all line breaks except 3,6,9,12,... will be removed
Notes:
3<3> means 3,6,9,12,...(start from 3, step is 3).
!3<3> means 1,2,4,5,7,8,10,11,(not 3,6,9,12,15,...)
Advanced Text Sort - Advanced Search and Replace
Example
Sort all lines by the value of second word
Procedures:
1) ctrl-o open source text file
2) ctrl-h open 'replace' dialog
3) set 'Replace with pattern' to "sort_by_word($match,2,2,'num')"
4) click 'Replace', all lines will be sorted by the value of second word
Example
Sort all words by the length
Procedures:
1) ctrl-o open source text file
2) ctrl-h open 'replace' dialog
3) set 'Replace with pattern' to "join(' ',sort { length($a)<=>length($b) } split(' ',$match))"
4) click 'Replace', the text will be sorted by the value of second word
Notes:
For batch replace files, please refer to Replace Pioneer help manual.