Question[Help]Reoccuring String

Posts 114 of 14 · Page 1 of 1
[Help]Reoccuring String
Hey in a source code there is a string that shows up three times.

Code:
<li class='hentry row1'>
How can i search for the second
Code:
<li class='hentry row1'>
Btw this is a source code of a webpage.

--
so far i have:

Code:
  Dim ViewRegEx As New Regex("<li class='hentry row1'><a href='/forum/(?<Topic1>(.*))' rel='bookmark' title='View topic'>")
        Topic1 = ViewRegEx.Match(httpContent).Groups("Topic1").ToString

        For Each Topic1 In httpContent
            TextBox1 = vbNewLine & Topic1
        Next
but this code:

For Each Topic1 In httpContent
TextBox1 = vbNewLine & Topic1
Next

doesnt work.
Your regex expression is completely false. Unless you have a firm understanding of regex expressions, don't use them.

If the string is same, why you want to get the second one. Just grab the first one !!

I can't help unless I know that they are the same or are different. In both cases code will be different.

Explain !!
Sorry this is off topic, but why is MJ Banned >.<
Quote Originally Posted by Invidus View Post
Sorry this is off topic, but why is MJ Banned >.<
I don't know why ??? Reason was: Don't bump old threads, and I can't remember, which old thread I bumped !!!
Hm. How long u banned 4.
Quote Originally Posted by Invidus View Post
Hm. How long u banned 4.
1 day !!!

@ppl: Ok, Let me work on it....Won't take much time !!
anyone know how to get the second one? my regex is function is correct. i found the first one but i cant find the second or third one.
Stay on topic , PM / VM MJ2
Can you post further website code? Including all 3 "hentry rows"?
yah here is the source code:

Code:
<li class='hentry row1'><a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/topic/1422-t3k/' rel='bookmark' title='View topic'>T3K</a> 
				by <address class="author vcard"><a class="url fn" href="http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2179-gsd-l3g3nd/" title='View Profile'>GSD L3G3ND</a>&nbsp;<a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2179-gsd-l3g3nd/' class='__user __id2179' title='View Profile'><img src='http://peterpanh4x.nintendolegends.com/forums/public/style_images/gameover/user_popup.png' alt='Icon' /></a></address><br />
				<span class='date'><abbr class="published" title="2010-04-23T12:50:11+00:00">Today, 12:50 PM</abbr></span></li>
				

				<li class='hentry row2 altrow'><a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/topic/1421-matches/' rel='bookmark' title='View topic'>Matches</a> 
				by <address class="author vcard"><a class="url fn" href="http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2179-gsd-l3g3nd/" title='View Profile'>GSD L3G3ND</a>&nbsp;<a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2179-gsd-l3g3nd/' class='__user __id2179' title='View Profile'><img src='http://peterpanh4x.nintendolegends.com/forums/public/style_images/gameover/user_popup.png' alt='Icon' /></a></address><br />

				<span class='date'><abbr class="published" title="2010-04-23T12:36:31+00:00">Today, 12:36 PM</abbr></span></li>
				

				<li class='hentry row1'><a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/topic/1420-animations/' rel='bookmark' title='View topic'>Animations</a> 
				by <address class="author vcard"><a class="url fn" href="http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2441-thefire/" title='View Profile'>TheFire</a>&nbsp;<a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2441-thefire/' class='__user __id2441' title='View Profile'><img src='http://peterpanh4x.nintendolegends.com/forums/public/style_images/gameover/user_popup.png' alt='Icon' /></a></address><br />
				<span class='date'><abbr class="published" title="2010-04-23T05:00:16+00:00">Today, 05:00 AM</abbr></span></li>
				

				<li class='hentry row2 altrow'><a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/topic/1419-hetoan-2-easy-challenges-hack/' rel='bookmark' title='View topic'>Hetoan 2 Easy challenges hack</a> 
				by <address class="author vcard"><a class="url fn" href="http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2441-thefire/" title='View Profile'>TheFire</a>&nbsp;<a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2441-thefire/' class='__user __id2441' title='View Profile'><img src='http://peterpanh4x.nintendolegends.com/forums/public/style_images/gameover/user_popup.png' alt='Icon' /></a></address><br />

				<span class='date'><abbr class="published" title="2010-04-23T04:09:16+00:00">Today, 04:09 AM</abbr></span></li>
				

				<li class='hentry row1'><a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/topic/1418-hack-problem/' rel='bookmark' title='View topic'>Hack Problem</a> 
				by <address class="author vcard"><a class="url fn" href="http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2441-thefire/" title='View Profile'>TheFire</a>&nbsp;<a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/user/2441-thefire/' class='__user __id2441' title='View Profile'><img src='http://peterpanh4x.nintendolegends.com/forums/public/style_images/gameover/user_popup.png' alt='Icon' /></a></address><br />
				<span class='date'><abbr class="published" title="2010-04-23T01:28:43+00:00">Today, 01:28 AM</abbr></span></li>
there is 3 repeating hentry row 1 and 2 hentry row 2.
Code:
<li class='hentry row1'><a href='http://peterpanh4x.nintendolegends.com/forums/index.php?/topic/1420-animations/' rel='bookmark' title='View topic'>Animations</a>
Since this isn't changing at all, why would you need to extract it?
the website changes though.
then how would you do it?
Only the link changes, right? Or also the name for instance "Animations"?
I am making a news feeder.
Basically the forum updates the sites when a new topic is up.
So it lists 5 of the newest topics.
And basically i want to make a program to list the 5 topics.

The only problem is.
Finding the other row1s.
Posts 114 of 14 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?