
October 27th, 2003, 06:59 PM
|
|
Junior Member
|
|
Join Date: Oct 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Regex fails
This code below always grabs the ENTIRE web page. Even if I make the match fail, say by changing the 513 to 513aaaa.
RefPage is a webpage retrieved via: Dim myClient As WebRequest = WebRequest.Create("http://www.aad.org/DermSP/DermSearch/member.php?mid=3639"
Refpage is what I expect it to be, fyi.
Dim outText As String = RefPage
Dim objRegex As Regex
objRegex = New Regex("<td width=""513"" valign=""top"" align=""left"" bgcolor=""#FFFFFF"">(.*)?</td>", RegexOptions.Singleline)
outText = objRegex.Replace(outText, "$1")
Response.Write(outText)
...makes me wonder if I am using Replace correctly... ALL i want it was is what I think should be represented by $1 (the (.*) in my regex).
Any help would be appreciated. If you look at that web page, my goal is to parse out the name and other contact info.
Thanks,
-Dwayne
|