Results 1 to 4 of 4

Thread: [RESOLVED] Loop collecting data

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    417

    Resolved [RESOLVED] Loop collecting data

    Hi Guys,

    I am making a webrequest to a web page, and need to collect some data which is arranged like:

    Code:
    <tr bgcolor="#ffffff" class="text" height=10>
    <td>Name1</td>
    <td>Age1</td>
    </tr>
    Code:
    <tr bgcolor="#ffffff" class="text" height=10>
    <td>Name2</td>
    <td>Age2</td>
    </tr>
    Code:
    <tr bgcolor="#ffffff" class="text" height=10>
    <td>Name3</td>
    <td>Age3</td>
    </tr>
    So i need to get the names and ages of all the players, if i user aregular expression that would only bring me back the first set of details but i was wondering how to go about looping untill i get all the data.

    any help would be appreciated

    thanks guys

    Graham

  2. #2
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Loop collecting data

    Hey,

    Using a Regular Expression you could get a Group of Matches, so you would easily be able to loop through all the Matches.

    Have a look here:

    http://msdn.microsoft.com/en-us/libr...ollection.aspx

    Gary

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2009
    Location
    Scotland
    Posts
    417

    Re: Loop collecting data

    ah that looks like what im after thanks Gary

    Graham

  4. #4
    ASP.NET Moderator gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: [RESOLVED] Loop collecting data

    Hey,

    No probs, have a look at the example in that link, and if you have any questions then post back.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width