Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1364.Advanced search and replace -- How to remove lines containing specified words in a text file?

User: user -- 2016-04-23          << 1363  1365 >>
Hits: 3245
Type: Advanced search and replace   
Search all Advanced search and replace examples
Description:
How to remove lines containing specified words in a text file? 
There are two files: one is words list as dictionary; the other is a text  
document with many lines.  
I want to remove all lines containing the specified words in the words list 
Input Sample:
dictionary file (word list):  
aaa  
bbb  
ccc  
 
text document:  
This is aaa 
This is bbb 
This is ccc 
This is ddd 
This is eee 
This is fff
Output Sample:
This is ddd 
This is eee 
This is fff 
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Assume dictionary file is d:\test\dictionary.txt 
1. ctrl-o open text file 
2. ctrl-h open 'replace' dialogue 
* set 'replace unit' to 'Line' 
* set 'if=>' to: 
 
* click 'advanced' tab, set 'run following at the beginning of replace' to: 
 
3. click 'replace', done.

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to extract lines containg specified words from many files? (79%)
How to remove all lines that contain some specific strings in a text file? (77%)
How to extract random lines containing specified words? (73%)
How to extract all lines that contain specific words in a file? (72%)
How to findout all lines that contain specified words in multiple files? (72%)
How to delete all lines containing specific word in specific column? (71%)
How to remove everything after specified strings in text files? (71%)
How to copy a line containing specified word and insert between line 1 and 2? (71%)

Check Demo of Advanced search and replace
Keywords:
remove lines containing  remove all lines containing  grep  diction  dictionary  document  remove lines contain  two files  doc  dic  split dictionary files  join if two lines  split dictionary txt  split of dictionary file  split files dictionary  split the dictionary  split a dictionary file  split dictionary file