User: chenjia -- 2011-07-01 << 813 815 >> |
Hits: 3597 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
In a txt file, random reorder line, every chapter contains 3-5 line, thanks very much! |
Input Sample: |
Chapter 1 xxxx line 1 line 2 line 3 line 4 chapter 2 xxxx line 5 line 6 line 7 line 8 chapter3: xxxx line 9 line 10 line 11 line 12 |
Output Sample: |
Chapter 1 xxxx line 9 line 2 line 6 line 5 chapter 2 xxxx line 1 line 6 line 3 line 11 chapter3: xxxx line 8 line 7 line 4 line 12 |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
Following procedure will shuffle all lines in a text file, without moving lines that start with "Chapter" or "chapter" or blank lines. 1. ctrl-o open source text file 2. ctrl-h open 'replace' dialog * set 'replace with pattern' to: * click 'Advanced' tab, set 'run following for each matched unit' to: 3. click 'replace', done. 4. ctrl-s save to a new file. |
Screenshot 1: Replace_Window |
Screenshot 2: Replace_Advanced_Window |