littlebigman
Well-known member
- Joined
- Jan 5, 2010
- Messages
- 75
- Programming Experience
- Beginner
Hello
I can't figure out why the regex object fails to find a pattern in a web page, although it's pretty simple and a test shows that the pattern is OK. Could it be that I misunderstood how VB's regex object works?
Here's the HTML input:
And here's the VB code:
Thanks for any help.
I can't figure out why the regex object fails to find a pattern in a web page, although it's pretty simple and a test shows that the pattern is OK. Could it be that I misunderstood how VB's regex object works?
Here's the HTML input:
VB.NET:
<table cellspacing="0" cellpadding="0" id="oft">
<thead>
<tr>
...
</tbody>
</table>
And here's the VB code:
VB.NET:
Dim goodstuff As Regex = New Regex("^<table cellspacing=""0"" cellpadding=""0"" id=""oft"">(.+?)</table>", RegexOptions.Singleline)
Dim m As Match
m = goodstuff.Match(Input)
If m.Success Then
Me.RichTextBox1.AppendText(m.Groups(1).Value)
Else
Me.RichTextBox1.AppendText("Table not found in www")
End If
Thanks for any help.