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: 3063
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 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 remove partially duplicated lines in a text file? (74%)
How to batch remove/delete first and last line of many text files? (74%)
How to remove/delete all English characters/letters in a text file? (74%)

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