Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

955.Text file parser -- How to extract two pieces of information (reoccurring patterns) from html file?

User: Hennsky -- 2012-06-03          << 954  956 >>
Hits: 3020
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract two pieces of information (reoccurring patterns) from html file  
into xls file? 
The source is a local htmlx file and the information should be written into an  
excel file. 
 
Thank you very much for your support! 
 
Best wishes from germany :) 
Input Sample:
... 
<div class="company_result"> 
<!-- Firma hier nur anzeigen, wenn keine Tochter vorhanden --> 
<span>company_name_1</span> 
<span>useless_information1</span> 
... 
<div> 
Datum:21.12.2009  
</div> 
... 
<div class="company_result"> 
<!-- Firma hier nur anzeigen, wenn keine Tochter vorhanden --> 
<span>company_name_2</span> 
<span>useless_information2</span> 
... 
<div> 
Datum:01.01.2012 
</div> 
... 
 
[Comment: the arrow (-->) in the line before the companyname is needed as  
identifier]
Output Sample:
company_name1|21.12.2009 
company_name2|01.01.2012 
... 
 
[Comment: the symbol "|" means new coloumn in the excel file]
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open html file 
2. ctrl-h open 'replace' dialogue 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
* uncheck option of "Print unmatched units" 
3. click 'replace', the expected columns will be extracted. 
4. ctrl-s save to output.csv file, which can be open by excel.

Screenshot 1:  Replace_Window


Similar Examples:
How to extract the artist and album information from mp3 files? (59%)
How to extract all lines with more than 30 characters from multiple files? (57%)
How to extract all specified date format from a text file? (57%)
How to extract all lines with specified date range from text file? (56%)
How to extract specified lines in different section of text file? (55%)
How to extract multiple fields from data file and create a csv file? (55%)
How to extract all lines with numbers from many text files? (54%)
How to extract multiple lines in specified order from many text files? (54%)

Check Demo of Text file parser
Keywords:
german  ddd  xls  best  span  written  formation  excel  support  extracte  extract to excel  extract excel  extract columns  html file parser  search html file extract  html save  save html  extract html