Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

402.Text file parser -- How to extract all lines that contain words A and B and C?

User: editor -- 2010-01-22          << 401  403 >>
Hits: 2741
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all lines that contain words AAA and BBB and CCC?

I want to extract some lines from a text file, the lines that contain all words of 'advance', 'search', 'replace','rename' will be extracted, and other lines will be deleted.
Input Sample:
advanced replace tool
advanced search, replace and rename software
search and replace application
batch download software
replace and rename tool, search in advance
advanced text extract, rename, search and replace tool
Output Sample:
advanced search, replace and rename software
replace and rename tool, search in advance
advanced text extract, rename, search and replace tool
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 dialog
* set 'Replace Unit' to 'Line'
* set 'Search for pattern' to:

* set 'Replace with pattern' to:

* uncheck 'Print Unmatched Unit' option
* check 'Enhanced Regular Exp' option
3. click 'Replace', done.
4. ctrl-s save to file.

Note: 
* uncheck 'Print Unmatched Unit' will delete unmatched lines.
* 'Enhanced Regular Exp' option will make explain special characters like '&', '|', '!' to 'and', 'or', and 'not' than normal Regular Expression.
Download Script:  scripts/402.rst.zip

Screenshot 1:  Replace_Window


Similar Examples:
How to extract all lines that contain words in a list? (91%)
How to extract all lines that contain specific words in a file? (83%)
How to extract all lines that contain A, but not any of B C D? (82%)
How to find out all files that contain all words of A, B and C? (78%)
How to extract all lines that contain specified words or phrases? (77%)
How to extract all links that contain imprint from a webpage? (76%)
How to extract all lines containing words in specified file? (75%)
How to extract all sentences that contain specified words? (75%)

Check Demo of Text file parser
Keywords:
extract all lines that contain words  how to extract all lines that contain words  special characters  special character  special  aaa  extracte  extract all lines  extract all line  unmatched  delete all lines that contain  extract all lines characters  characters special  extract lines that contain pattern  lines contain words  extract lines that contain  extract characters  pattern delete characters