Sir,
I am writing a script to remove html tag using Regular expression.
For example, I have a string = "<td class="whatever " width=12>some content
here</td>"
What I want to return is "<td class="whatever " width=12>", I used pattern =
"<td(.*)>"
However instead of returning "<td class="whatever " width=12>"
it returns "<td class="whatever " width=12>some content here</td>"
Below is my code, what did I do wrong here?
Dim webPage As String = GrabUrl()
Dim abc As ArrayList = New ArrayList
RichTextBox1.Te xt = webPage
Dim TagExpression As New Regex("<td(.*)> ", RegexOptions.Ig noreCase)
Dim mc As RegularExpressi ons.MatchCollec tion
mc = TagExpression.M atches(webPage)
Dim m As Match
For Each m In mc
abc.Add(m.Group s(0))
Next
ListBox1.DataSo urce = abc
--
Kind regards
Guoqi Zheng
guoqi AT meetholland dot com
Http://www.meetholland.com