954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Extract video names and links along with ther part no. from a given string

<div style="float: left; font-variant: small-caps;">movie link (zshare) :</div><div style="float: left; margin-left: 10px;">Link <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58502819262e0ecc/">1</a> </div><div style="float: right;"><a href="javascript:DeadLink('http://www.movies-on-demand.tv/report.php?id=2845')"><img title="Report Dead Link" src="http://img.movies-on-demand.tv/templates/mod/images/broken.gif"></a></div></div><div style="margin-top: 2px; width: 550px; height: 20px; background-color: rgb(255, 255, 255); font-size: 13px;"><div style="float: left; font-variant: small-caps;">movie link (zshare) :</div><div style="float: left; margin-left: 10px;">Link <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58600439d353044a/">1</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58600547e014d9d5/">2</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.zshare.net/video/58600619c7dc7adc/">3</a> </div><div style="float: right;"><a href="javascript:DeadLink('http://www.movies-on-demand.tv/report.php?id=2845')"><img title="Report Dead Link" src="http://img.movies-on-demand.tv/templates/mod/images/broken.gif"></a></div></div><div style="margin-top: 2px; width: 550px; height: 20px; background-color: rgb(233, 233, 233); font-size: 13px;"><div style="float: left; font-variant: small-caps;">movie link (supernovatube) :</div><div style="float: left; margin-left: 10px;">Link <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.supernovatube.com/divx.php?viewkey=9c9fad730126e551a20c">1</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.supernovatube.com/divx.php?viewkey=a1f399ad827192f71490">2</a> <a rel="nofollow" style="color: rgb(0, 0, 221); text-decoration: underline;" target="_blank" href="http://www.supernovatube.com/divx.php?viewkey=f7ccdf44a27a41005391">3</a> </div><div style="float: right;"><a href="javascript:DeadLink('http://www.movies-on-demand.tv/report.php?id=2845')"><img title="Report Dead Link" src="http://img.movies-on-demand.tv/templates/mod/images/broken.gif"></a></div></div>


I want to extract following from above:
'Zshare' than href of the 'Link' and 1 as part no. , will assign group =1
'Zshare' than href of the 'Link' and 1 as part no.(here 3 hrefs will be extracted and each will have respective part no.) , will assign group = 2(since 'Zshare is two times)
'supernovatube' than href of the 'Link' and 1 as part no.(here 3 hrefs will be extracted and each will have respective part no.) , will assign group = 0
i will insert these values in a table after extraction with following structure: video_sitename,link_url,partno,groupid

Please help...

jyotiu
Light Poster
33 posts since Sep 2008
Reputation Points: 10
Solved Threads: 0
 

I wrote a solution on your previous thread ( http://www.daniweb.com/forums/thread186448.html )... this is almost a duplicated one. Why not to continue to develop your issue into your previous thread ?

martin5211
Posting Whiz in Training
271 posts since Aug 2007
Reputation Points: 52
Solved Threads: 23
 

Hi martin5211
thanks for your replies... i don't know i was very desperate for solution anyways i have done it myself :) thanks for the reply

chinmayu
Newbie Poster
11 posts since Nov 2008
Reputation Points: 10
Solved Threads: 1
 

No problem, I could have continued the development anyway... regex for scrapping data and manipulating arrays can be a pain sometimes...

martin5211
Posting Whiz in Training
271 posts since Aug 2007
Reputation Points: 52
Solved Threads: 23
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You