Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1228.Text file parser -- How to extract all lines that contain words in a list?

User: basikabo -- 2014-08-06          << 1227  1229 >>
Hits: 1271
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all lines that contain words in a list?
Input Sample:
A.txt
AAA
BBB

B.txt
111AAA111
222BBB222
232CCC231
Output Sample:
Output file:

111AAA111
222BBB222
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Make sure a.txt is in d:\test\ folder
1. ctrl-o open b.txt
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.
4. ctrl-s save to file.

Note: you must use double backslash for folder delimiter, such as d:\\test\\a.txt

Screenshot 1:  Replace_Window


Screenshot 2:  Replace_Advanced_Window


Similar Examples:
How to extract all lines that contain words A and B and C? (91%)
How to extract all lines that contain specific words in a file? (85%)
How to extract all lines that contain specified words or phrases? (79%)
How to remove all lines that contain one or more words in a list? (78%)
How to extract all lines containing words in specified file? (77%)
How to extract all lines that contain "abc" from multiple files? (77%)
How to remove all the lines that do not contain any of words in a list? (77%)
How to delete all lines that contain only a word and a blank? (76%)

Check Demo of Text file parser
Keywords:
extract all lines that contain words  how to extract all lines that contain words  matches  backslash  double  slash  extract all lines  delimiter  extract all line  test  extract double lines  extract double words  double words  double lines  lines contain words  extract lines that contain  tab delimiter  extract all lines contain