Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

711.Text file parser -- How to extract all specified links from a html file?

User: wdtsf -- 2011-02-01          << 710  712 >>
Hits: 2723
Type: Text file parser   
Search all Text file parser examples
Description:
How to extract all specified links from a html file? thanks!
Input Sample:
<div class="main_w">
<div class="content_a">
<div class="rankTitle">
<h1>天津美食点评(最近好评)</h1>
<div class="right">排序: <strong><a href="javascript:void(0);" id="orderTitleDiv">最近好评</a></strong>
<div id="odrop"><ul><li><a href="/reviewlist/10/10_ac1" class="B">回应数</a></li><li><a href="/reviewlist/10/10_bc1" class="B">鲜花数</a></li><li><a href="/reviewlist/10/10_cc1" class="B">时间</a></li></ul></div>
</div>
</div>
<dl id="rev_25979207" class="contList"><dt><div cla
Output Sample:
http://www.thankyou.com/shop/4212402
http://www.thankyou.com/shop/3445258
http://www.thankyou.com/shop/2192851
http://www.thankyou.com/shop/3369571
http://www.thankyou.com/shop/4282263
http://www.thankyou.com/shop/4129080
http://www.thankyou.com/shop/4193263
http://www.thankyou.com/shop/4281592
http://www.thankyou.com/shop/2339239
http://www.thankyou.com/shop/1945840
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
Following procedure extract all links that contain "shop":
1. ctrl-o open html file
2. ctrl-h open 'replace' window
* set 'replace with pattern' to:

3. click 'replace', done.
4. ctrl-s save to file.

Note: if you need to remove # mark after http address, and remove duplicated address, use:


Screenshot 1:  Replace_Window


Similar Examples:
How to extract all image links from a html file? (85%)
How to batch extract specified lines from a text file? (79%)
Need to extract all links from html file (79%)
How to extract all specific links from webpage? (78%)
How to extract all image links from multiple html files?  (76%)
How to extract all specified date format from a text file? (76%)
How to extract specified lines in multiple excel(csv) files? (72%)
How to extract all lines with specified date range from text file? (72%)

Check Demo of Text file parser
Keywords:
mark  grep  duplicated  extract all links  remove duplicate  remove duplicat  remove dupl  remove dup  links  duplicate  remove links  remove after html  save links  remove address  extract http links  extract links from html file  extract links from html  extract all http links