Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

65.Advanced search and replace -- How to remove/delete all blank lines in a text file?

User: editor -- 2008-05-06          << 64  66 >>
Hits: 10981
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to remove all blank lines in a text file?
Input Sample:
First international aid reaches Myanmar after cyclonePhotos 
Obama takes early lead in race for delegatesLatest numbers 
 
 
Democrats face fence-mending after primaries, exit polls say 
 
Nigeria oil rebels pledge truce if Jimmy Carter mediates 
D.C.-area sniper asks in letter for end to death-row appeal 
Output Sample:
First international aid reaches Myanmar after cyclonePhotos 
Obama takes early lead in race for delegatesLatest numbers 
Democrats face fence-mending after primaries, exit polls say 
Nigeria oil rebels pledge truce if Jimmy Carter mediates 
D.C.-area sniper asks in letter for end to death-row appeal
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Procedures:   
1.press ctrl-o to open source file   
2.press ctrl-h to open replace dialog, set as follows:   
In 'Replace' page:   
* Set 'Replace Unit' to be 'Line'  
* Fill 'Search for pattern' to be:  
 
* Fill nothing in 'Replace with pattern' 
 
3. click 'Replace' Button, ok!   
Note: '^\s*$' is a regular expression, means lines only containing spaces or table key. 
Replace with nothing means remove.
Download Script:  scripts/65.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to remove/delete all symbols in a text file? (86%)
How to remove/delete extra blank lines in multiple text files? (85%)
How to remove duplicate lines from a text file? (77%)
How to remove/delete all lines ending by a comma(,) in a text file? (76%)
How to remove/delete all multi-byte characters in a text file? (76%)
How to reverse the order of all the lines in a text file? (75%)
How to remove/delete unnecessary line breaks in a text file? (75%)
How to delete last blank lines from multiple files? (74%)

Check Demo of Advanced search and replace
Keywords:
remove all blank lines  table  blank lines  spaces  blank line  key  blank  delete all  containing  space  regular expression remove blank lines  remove table  remove blank spaces  regular expression and remove spaces  remove a lines with a regular  remove all blank lines in a file  regular expression to remove spaces  remove blank lines