Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

414.Text merge -- How to merge every two lines into one line between (part1) and (partn)?

User: shuaigemi -- 2010-02-05          << 413  415 >>
Hits: 808
Type: Text merge   
Search all Text merge examples
Description:
How to merge every two lines into one line between ¡¾part1¡¿and ¡¾partn¡¿ in a text file?
Input Sample:
.
.
.
¡¾part1¡¿

line 1
(ps:there is a blank line between every two lines)
line 2

line 3

line 4
.
.
.

¡¾part2¡¿(or maybe ¡¾part3¡¿or ¡¾part4¡¿)
.
.
.
Output Sample:
.
.
¡¾part1¡¿

line 1 line 2

line 3 line 4
.
.
.

¡¾part2¡¿(or maybe ¡¾part3¡¿or ¡¾part4¡¿)
.
.
.
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open 'replace' dialog:
* in 'search for pattern', fill:

* in 'replace with pattern' fill:

3. click 'Replace', done!
4. ctrl-s save to file.
Download Script:  scripts/414.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to merge every 3 lines from file A and every 1 line from file B? (57%)
How to join every n lines into 1 line in a text file? (57%)
Join every 3 lines into one line (56%)
How to merge many files into one file, and add filename before each file? (53%)
How to insert two columns into a database file separated by "|"? (52%)
How to merge more columns into one column in multiple csv files? (50%)
How to extract all lines whose line numbers are multiple of 3? (49%)
How to merge 3 text files by getting one line from each file repeatly? (49%)

Check Demo of Text merge
Keywords:
merge every two lines into one  merge every two lines  every two line  merge  text merge  merg  between  every  lines  par  between every two lines  every between two lines  merge two lines into one  merge every line  merge text lines into one line  merge two line into one  merge lines  merge n lines