Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

549.Regular expression replace -- How to remove all blank lines and lines that started with Name: or Addr:?

User: editor -- 2010-06-28          << 548  550 >>
Hits: 408
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How to remove all blank lines and lines that started with Name: or Addr:?
Input Sample:
Name: user1
Addr: place1
Age: 33
Score: 80

Name: user2
Addr: place2
Age: 23
Score: 70

Name: user3
Addr: place3
Age: 36
Score: 90
Output Sample:
Addr: place1
Score: 80
Addr: place2
Score: 70
Addr: place3
Score: 90
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file
2. ctrl-h open replace window
* set 'replace unit' to 'Line'
* 'in search for pattern' entry, enter:

3. click 'Replace', done!

Similar Examples:
How to remove all lines in file b.txt that appearred in a.txt? (62%)
How to remove all lines that are not ended with word "ok" or "done"? (62%)
How to remove/delete all blank lines in a text file? (61%)
How to remove all c++ comments that started with //? (60%)
How to remove all lines that contains more than one word? (60%)
How to delete/remove all lines that appearred more than once? (58%)
How to remove all the lines appeared in file B,C,D from file A? (57%)
How to remove all lines that shorter than 10 characters? (57%)

Check Demo of Regular expression replace
Keywords:
blank lines  lines that start  blank line  blank  regular expression  addr  expression  regular  regula  how to remove  remove blank lines  search and replace with blank lines  remove blank  replace blank lines  replace with blank  remove lines all  remove lines  remove all text