Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1306.Advanced search and replace -- How to merge consecutive lines that have the same first column?

User: y8888 -- 2015-05-26          << 1305  1307 >>
Hits: 1446
Type: Advanced search and replace   
Search all Advanced search and replace examples
The same is incorporated into the first rows that line
Input Sample:
abc Magenta;Fuchsia ;DarkMagenta
abc Purple
sdf BlueViolet;DarkMagenta MediumSlateBlue
sdf SlateBlue;DarkSlateBlue
df Violet
er1 GhostWhite ;Blue
er1 Navy ;CornflowerBlue ;LightSteelBlue ;SlateGray
Output Sample:
abc Magenta;Fuchsia ;DarkMagenta;Purple
sdf BlueViolet;DarkMagenta MediumSlateBlue;SlateBlue;DarkSlateBlue
df Violet
er1 GhostWhite ;Blue;Navy ;CornflowerBlue ;LightSteelBlue ;SlateGray
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue:
* set 'replace unit' to 'Paragraph'
* set 'replace with pattern' to:

* click 'settings' tab:
* set 'Para start' to 'other':

* set 'Para end' to 'None'
3. click 'replace', done.

Screenshot 1:  Replace_Window

Screenshot 2:  Replace_Settings_Window

Similar Examples:
How to merge other columns' data base on the value of the first column? (65%)
How to count the consecutive lines with the same pattern? (64%)
How to merge other columns one by one into the first column? (61%)
How to merge two text file base on the value of first column and do sort? (60%)
How to extract lines with specific words in first column? (59%)
How to merge adjacent lines having same value in column one in CSV files? (59%)
How to remove/delete consecutive duplicate lines in a text file? (58%)
How to compare two folders and merge files which have same file names by column? (58%)

Check Demo of Advanced search and replace
consecutive  onsecutive  previous  cut  first row  merge  merg  mer  non  paragraph  consecutive words  merge lines with the same column  merge rows  replace with previous line  merge match  merge lines  merge n lines  merge 3 lines to 1 line