Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

191.Advanced search and replace -- How to batch remove/delete lines started by "address:"?

User: editor -- 2008-06-16          << 190  192 >>
Hits: 405
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to batch remove lines started by "address:"?
Input Sample:
name:aaa
address:bbbbbbbbbbbbbb
age:22
telephone:11111111
name:aaa2
address:bbbbbbbbbbbbbb
age:13
telephone:555555555
Output Sample:
name:aaa
age:22
telephone:11111111
name:aaa2
age:13
telephone:555555555
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open your text file 
2. ctrl-h open 'Replace' dialog 
* set 'Replace Unit' to 'Line' 
* set 'Search for pattern' 

* set nothing in 'Replace with Pattern' 
3. click 'Replace', done! 

Note: here "^address" is a regular expression, "^" means the begin of a line.
Download Script:  scripts/191.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to batch remove/delete first 8 lines of many files? (69%)
How to batch remove/delete first and last line of many text files? (65%)
How to batch remove/delete first 500 bytes of many binary files? (61%)
How to batch remove/delete non-fixed text in a text file? (60%)
How to remove/delete all lines with three symbol '='? (59%)
How to remove/delete all blank lines in a text file? (59%)
How to remove all blank lines and lines that started with Name: or Addr:? (57%)
How to batch remove all the text that enclosed by a pair of parenthesis? (56%)

Check Demo of Advanced search and replace
Keywords:
batch remove line  delete lines  delete line  remove lines  move lines  batch remove  address  regular expression  addr  delete  remove a lines with a regular  batch file regular expression remove  batch remove lines in text file  batch file set regular expression  remove line begin  remove lines batch  batch file remove lines  regular expression replace remove line