Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

820.Regular expression replace -- How to remove all lines that contain some specific strings in a text file?

User: editor -- 2011-07-12          << 819  821 >>
Hits: 314
Type: Regular expression replace   
Search all Regular expression replace examples
Description:
How to remove all lines that contain some specific strings in a text file?
All lines that contain any of following strings need to be removed:
hotmail.com
yahoo.com
gmail.com
dennys.com
ibm.com
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open text file
2. ctrl-h open 'replace' dialogue
* set 'replace unit' to 'Line'
* set 'search for pattern' to:

3. click 'replace', done!
4. ctrl-s save to file.


Screenshot 1:  Replace_Window


Similar Examples:
How to remove all lines that contain ABC but not contain DEF in text file? (77%)
How to remove all lines that contain one or more words in a list? (72%)
How to findout all lines that contain specified words in multiple files? (72%)
How to replace text containing some special symbols in a text file? (69%)
How to extract all blocks that contain specified strings like "A"? (67%)
How to insert a line after specific lines in a text file? (67%)
How to extract all lines with specified date range from text file? (66%)
How to remove all the lines that with odd line number for multiple files? (66%)

Check Demo of Regular expression replace
Keywords:
yahoo  specific  mail  strings  remove all line  string  regular expression  expression  regular  regula  remove lines contain  remove all text following  remove lines all  lines contain  remove lines  remove lines file a  remove lines file  text file remove all