Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1163.Advanced search and replace -- How to split one line into two lines from middle?

User: shanfeng -- 2013-12-25          << 1162  1164 >>
Hits: 3391
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to divided one line into two lines?
Input Sample:
a b c d e f g h  
a b c d s f g h 
a c d e s f g h
Output Sample:
a b c d  
e f g h  
a b c d  
s f g h 
a c d e  
s f g h
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume words are separated by spaces, we need to split a line into two lines, each has half number of words. 
1. ctrl-o open text file 
2. ctrl-h open 'replace' dialogue 
* set 'replace unit' to 'Line' 
* set 'replace with pattern' to: 
 
3. click 'replace', done. 
 
Note: if you want each splitted line has same number of characters, you can use following in step 2: 

Screenshot 1:  Replace_Window


Similar Examples:
How to split one line into 3 to 5 sentences ended by period randomly? (62%)
How to split a single line into many lines, keep two words for each line? (62%)
How to split a text file into multiple files evenly on size? (61%)
How to split each line of text into 2 lines with same number of characters? (61%)
How to duplicate each line 5 times in a text file? (61%)
How to split a single line into many lines according by Special symbols (60%)
How to split a text file into multiple files with maximum 100k bytes? (59%)
How to distribute 6 numbers into multiple lines randomly? (57%)

Check Demo of Advanced search and replace
Keywords:
separated by spaces  divide  div  two lines  middle  length  number of characters  spaces  separate  two  split file by number of words  separated spaces  split text file into two  split lines into words  split text file into number of lines  split text file by number of lines  two lines of text  split line by words