Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

170.Advanced search and replace -- How can I reverse the sequence of all words in a text file?

User: editor -- 2008-06-02          << 169  171 >>
Hits: 3647
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How can I reverse the sequence of all words in a text file?
Input Sample:
This is a test
Output Sample:
test a is This
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source file.     
2. ctrl-h open 'Replace' dialog,     
in 'Replace' window,      
* fill in 'Search for Pattern':     
 
* fill in 'Replace with Pattern': 
 
3. click 'Replace', finish.   
 
Notes: words_r($match,1,-1," "," ") means reverse order of the words from first to last one. Use " " as input delimiter and output delimiter.
Download Script:  scripts/170.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to reverse the order of all the lines in a text file? (72%)
Can I count the frequency of each word in a text file? (72%)
How to count the occurrence of a list of words in a text file? (68%)
How to remove/delete all symbols in a text file? (66%)
How to remove the sequence number before each line of text file? (65%)
How to count and sort the frequency of all words appeared in many text files? (65%)
How to reverse all cases of letters in a text file? (65%)
How to reverse all the words in each line of a csv file? (64%)

Check Demo of Advanced search and replace
Keywords:
reverse  delimiter  order  sequence  seq  last  input  las  fin  del  reverse sequence  reverse order words  reverse order 2 words  reverse words  reverse the order  search text file in reverse  replace with a sequence of words  replace in reverse text