I need to output "Exceptional Innovation"
<div id="basic-info">
<h1 class="fn org">
<span>
Exceptional Innovation
</span>
Here's my Code
RichTextBox1.Text = htmlsource
Dim myMatch As New System.Text.RegularExpressions.Regex("(?<=<div id=""basic-info""> <h1 class=""fn org""> <span>).+?(?<=</span>)", RegexOptions.IgnoreCase Or RegexOptions.Compiled)
Dim matches As MatchCollection = myMatch.Matches(RichTextBox1.Text)
For Each itemcode As Match In matches
Dim output As String = (itemcode.Value.Split("""").GetValue(0))
MsgBox(output)
Next
Could somebody help me?
It works fine if I do something like this
Dim strsample = "345wq3453q245fgxh<div id=""basic-info""><h1 class=""fn org""><span>Exceptional Innovation</span>34535345345"
Dim myMatch As New System.Text.RegularExpressions.Regex("(?<=<div id=""basic-info""> <h1 class=""fn org""> <span>).+?(?<=</span>)", RegexOptions.IgnoreCase Or RegexOptions.Compiled)
Dim matches As MatchCollection = myMatch.Matches(strsample)
For Each itemcode As Match In matches
Dim output As String = (itemcode.Value.Split("""").GetValue(0))
MsgBox(output)
Next
But when I use the top most code I'm lost. Is there something wrong with my code or in the html source?