User: user -- 2016-04-08 << 1358 1360 >> |
Hits: 2519 |
Type: Advanced search and replace |
Search all Advanced search and replace examples |
Description: |
There is a mixed text file containing English and Chinese lines, as well as the line starting with number. The sequence are line#1 and line#2 starting with number, line#3 is English and line#4 is Chinese: How to change the line sequence of Chinese line and English line to let Chinese line followed by the second line, and English line followed by Chinese line. |
Input Sample: |
1234 1234-1 Hello! ÄãºÃ¡£ |
Output Sample: |
1234 1234-1 ÄãºÃ¡£ Hello! |
Answer: |
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps. |
The following steps will exchange line3 and line4 in 4-line-groups where first line and second line start with digits, the third line does not contain Chinese letters, the 4th line contain chinese letter. 1. ctrl-o open text file 2. ctrl-h open 'replace' dialogue file * set 'search for pattern' to: * set 'replace with pattern' to: 3. click 'replace', done. 4. ctrl-s save to file. |
Screenshot 1: Replace_Window |
Similar Examples: |
How to change the order of lines according to specified position? (64%) How to move strings matching specified patterns? (62%) How to change each line into specified format? (62%) How to change each line of data to the specified format? (60%) How to count the number of lines under each specified pattern? (56%) How to re-arrange lines with in a specified number of lines? (54%) How to split each line of csv file into a single file with specified format? (54%) How to extract random lines containing specified words? (53%) |
Check Demo of Advanced search and replace |
Keywords: |
mix chinese matching line starting with 4th third exchange starting with starting groups matching lines line matching exchange lines first 4 letters first letters line exchange exchange replace replace starting with |