Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

403.Text file parser -- How to extract all lines that contain A, but not any of B C D?

User: editor -- 2010-01-25          << 402  404 >>
Hits: 1898
Type: Text file parser   
Search all Text file parser examples
How to extract all lines that contain A, but not any of B C D?

I want to extract some lines from a text file, the lines that contain 'advance', but do not contain any of 'search', 'replace','rename' will be extracted, and other lines will be deleted.
Input Sample:
advanced replace tool 
search, replace and rename software 
search and replace application 
advanced batch download software 
replace and rename tool, search in advance 
advanced text extract, rename, search and replace tool
just advance
Output Sample:
advanced batch download software 
just advance
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.

* 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/

Screenshot 1:  Replace_Window

Similar Examples:
How to extract all lines that contain chem, but not any of org and cn? (89%)
How to extract all lines that contain words A and B and C? (80%)
How to extract all lines that contain words in a list? (76%)
How to extract all lines that contain specific words in a file? (72%)
How to extract all links that contain imprint from a webpage? (70%)
How to extract all lines that contain "abc" from multiple files? (70%)
How to extract all lines not containing 'ing' and 'and'? (69%)
How to remove all lines that contain ABC but not contain DEF in text file? (69%)

Check Demo of Text file parser
how to extract all lines that contain a but not any of b c d  special characters  special character  special  extracte  extract all lines  extract all line  unmatched  unmatch  not contain  delete all lines that contain  extract all lines characters  characters special  extract lines that contain pattern  extract lines that contain  extract characters  pattern delete characters  delete characters