By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,582 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,582 IT Pros & Developers. It's quick & easy.

Regular expressions Problem

P: n/a
Hello,

I am trying to use the following in a project to identify a table that is ided="news of the day"

Function readHtmlPage(url As String) As String

result = ....'as string
dim regexp as regex = New Regex("<table>((.|\n)News of(*?))</table>", RegexOptions.IgnoreCase)
dim str as string
Dim objMatch as Match
For Each objMatch in regexp.Matches(result)
Str= objMatch.ToString()
Next
return str'result

But its not getting anything. Please let me know what is wrong with getting the "News of " string

Thanks
MP
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I figured that the problem was i dint import the namespace

My other issue is that i need to replace the results if there is any href=
to something else ???

any suggestions appreciated
Thanks

"Michael Persaud" <ji*********@hotmail.com> wrote in message
news:O5**************@TK2MSFTNGP10.phx.gbl...
Hello,

I am trying to use the following in a project to identify a table that is
ided="news of the day"

Function readHtmlPage(url As String) As String

result = ....'as string
dim regexp as regex = New Regex("<table>((.|\n)News of(*?))</table>",
RegexOptions.IgnoreCase)
dim str as string
Dim objMatch as Match
For Each objMatch in regexp.Matches(result)
Str= objMatch.ToString()
Next
return str'result

But its not getting anything. Please let me know what is wrong with getting
the "News of " string

Thanks
MP
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.