Replace Pioneer Home   All Examples   Free Download

 New request --free

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

User: editor -- 2008-05-06
Hits: 867
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" 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
Check Demo of Advanced search and replace