Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

942.Text file parser -- How to extract all lines that contain "abc" from multiple files?

User: editor -- 2012-04-30          << 941  943 >>
Hits: 4113
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all lines that contain "abc" from multiple files? and write the output lines into a single file.
Input Sample:
file1: 
abc 
def 
 
file2: 
abcabc 
defdef 
abc123 
...
Output Sample:
output file: 
abc 
abcabc 
abc123
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. open "Tools->Batch Runner" menu 
2. drag and drop multiple files from Windows File Browser to "Batch Runner" window 
3. click "Fast Replace" button 
* click "Add" to add new rules 
* set "search" to:  
 
* set "replace" to: 
 
* click "ok" 
4. check option of "Reg exp" and "Extract", uncheck option of "cross line" 
5. click "start" button 
6. select "output to single file" button, and select "output filename", done.

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to extract all lines that contain specific words in a file? (76%)
How to extract all sentences that contain special keyword from multiple articles? (76%)
How to extract all lines that contain words in a list? (75%)
How to findout all lines that contain specified words in multiple files? (75%)
How to extract all lines with more than 30 characters from multiple files? (74%)
How to extract all links which contain "shop" from many html files? (74%)
How to remove all the lines that with odd line number for multiple files? (73%)
How to extract all lines that contain words A and B and C? (73%)

Check Demo of Text file parser
Keywords:
abc  write  extract all lines  output to single file  rules  extract all line  cross line  single  single file  rule  write lines  extract lines that contain  extract lines from multiple files  extract all lines contain  extract lines contain  extract lines from files  extract multiple lines  lines that start