Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1029.Advanced search and replace -- How to separate each paragraph by two lines?

User: Will -- 2012-11-28          << 1028  1030 >>
Hits: 1595
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to separate each paragraph by two lines and if paragraph had odd number of lines, then add a blank line.
Input Sample:
para1
para1
para1
para1
para1
<blank>
para2
para2
para2
para2
para2
para2
<blank>
para3
para3
para3
para3
para3
Output Sample:
para1
para1
<blank>
para1
para1
<blank>
para1
<blank>
<blank>
para2
para2
<blank>
para2
para2
<blank>
para2
para2
<blank>
para3
para3
<blank>
para3
para3
<blank>
para3
<blank>
Answer:
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:

3. click 'replace', done.

Screenshot 1:  Replace_Window


Similar Examples:
How to generate permutation of all paragraphs? (58%)
How to add a single space after each character in a text file? (58%)
How to add some text before each paragraph automatically? (58%)
How to extract different part from adjacent lines? (56%)
How to randomly select one line from each paragraph? (55%)
How to add a <hr> at the end of each paragraph? (54%)
How to insert a blank line after each group of lines with same month? (53%)
How to split one line into two lines from middle? (52%)

Check Demo of Advanced search and replace
Keywords:
separate each paragraph by two lines  odd  two lines  separate  blank line  two  paragraph  paragra  blank  number of lines  search and replace odd lines  odd lines  odd line  replace odd  two lines of text  add blank lines  search and replace with blank lines  add number to lines