I have a code, that searches for emails. But when I load in the source code with html and all the emails inside, It doesnt spit out all the emails. Can someone help or improve my code?
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim emailString As String = RichTextBox1.Text
Dim emailRegEx As New Regex("""(\S+)@([^\.\s]+)(?:\.([^\.\s]+))+", RegexOptions.IgnoreCase)
Dim m As Match = emailRegEx.Match(emailString)
If m.Success Then
Dim output As String = ""
output &= "User name: " & m.Groups(1).Value & vbCrLf
RichTextBox2.Text = output
Else
MsgBox("The e-mail address cannot be parsed.")
End If
End Sub

