Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

1158.Text file parser -- How to extract all data like ##.##-##.## from many files?

User: Andy -- 2013-12-14          << 1157  1159 >>
Hits: 3445
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all data with format of ##.##-##.## from many text file, and write output to a new text file with specified format?
Input Sample:
File1:MS_GR11720131212.txt 
... 
Crude Soybean Oil       37.74- 38.49      dn 0.41          -225F to-150 F unch 
 
46.5% Soybean Meal R   445.10- 455.10     dn 8.8           +15 F to +25 F unch 
 
46.5% Soybean Meal T   445.10- 460.10     dn 8.8           +15 F to +30 F unch 
 
Soybean Hulls-bulk     170.00- 190.00     unch 
 
Soybean Hulls-pellets  170.00- 195.00     dn 1000-unch 
 
File2:... 
File3:... 
  
Output Sample:
20131212 37.74 38.49 445.10 455.10 445.10 460.10 170.00 190.00 170.00 195.00 12.6975 13.0175 20.25 18.25  
lines for file2... 
lines for file3...
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 multiple files from "Windows File Browser" to "Batch Runner" window 
3. click "Fast Replace" button 
click "add" to add 1st rule: 
* set "search" to:  
* set "replace" to:  
* click ok 
click "add" again to add 2nd rule: 
* set "search" to:  
* set "replace" to:  
* click ok 
click "add" again to add 3rd rule: 
* set "search" to:  
* set "replace" to:  
* click ok 
4. check option of "Reg exp", "Cross Line", and "Extract" 
5. click "start", and select "output to single file", done. 
 
Note: don't forget to check "Extract".

Screenshot 1:  Fast_Replace_Window


Similar Examples:
How to extract all data followed by specified words from many files? (69%)
How to extract all lines with numbers from many text files? (66%)
How to extract all image links from a html file? (65%)
How to extract all the links and images from many web page files? (65%)
How to extract all specified links from a html file? (62%)
How to extract all email addresses from many text files? (61%)
Need to extract all links from html file (61%)
How to extract all image links from multiple html files?  (60%)

Check Demo of Text file parser
Keywords:
3rd  1st  specified format  2nd  write  output to single file  cross line  single  single file  data  extract all chars from text file  extract data from text file  extract data  specified chars  replace with multiple data  many rule  format many files  multiple chars