Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi all, I am trying to develop a routine that will allow me to feed it an html string and have it return a collection of string arrays representing all the tables that where found.

 

I have this regular expression:

 

<table[^>]*>[\w|\t|\r|\W]*</table>

 

 

Below is a snippet of where I am. I am unsure how to proceed.

Dim sTablePattern As String = "<table[^>]*>[\w|\t|\r|\W]*</table></center>" 'This expression grabs the table from the html

       Dim regex As New regex(sTablePattern, RegexOptions.IgnoreCase Or RegexOptions.Multiline Or RegexOptions.IgnorePatternWhitespace Or RegexOptions.Compiled)
       Dim om As Match = regex.Match(sHtml)

 

 

Ultimately I would like to feed it different websites like this or this and have a collection of 2d string arrays (the array would hold the string elements of the table).

 

Any help would be greatly appreciated. Thanks!

 

BTW, I am using vb.net 2003

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...