Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

710.Text file parser -- How to extract all links which contain "shop" from many html files?

User: thank_you_all -- 2011-01-31          << 709  711 >>
Hits: 2802
Type: Text file parser   
Search all Text file parser examples
Description:
How to extarct all links which contain"shop" from many html files?
Input Sample:
http://www.ok.com 
... 
... 
<li><a href="/shop/1914685#ur" onclick="pageTracker._trackPageview
Output Sample:
http://www.ineed/shop/1914685
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 html files from windows file browser to "Batch Runner" window 
3. check "output filename" option, change the following entry to: 
 
4. click "Fast Replace" button: 
* click "Add" to add a rule: 
* in 'search' entry, enter: 
 
* in 'replace' entry, enter: 
 
* click "ok" button 
4. make sure 'regular exp' and 'cross line' option are selected. 
5. change the "write mode" from ">" to ">> Append", then click 'Start' button, all links will be extract to output.txt.

Screenshot 1:  Batch_Runner_Window


Screenshot 2:  Fast_Replace_Window


Similar Examples:
How to extract all lines that contain "abc" from multiple files? (76%)
How to extract all lines with numbers from many text files? (71%)
How to extract all the links and images from many web page files? (69%)
How to extract all lines that contain words A and B and C? (67%)
How to extract all image links from a html file? (67%)
How to extract all lines that contain A, but not any of B C D? (66%)
How to extract all lines containing words in specified file? (65%)
Need to extract all links from html file (65%)

Check Demo of Text file parser
Keywords:
mode  grep  extract all links  write  many html files  links  append  contains  ppen  link  all contain shop  extract all links from multiple html  extract links from multiple html files  extract all links from files  extract links from files  make links  extract links from html file  extract links from html