Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
RichTextBox1.Text = "<html>" & Constants.vbCrLf & _
"<head>" & Constants.vbCrLf & _
"<title>the brown monkey</title>" & Constants.vbCrLf & _
"<link rel=stylesheet href=page.css>" & Constants.vbCrLf & _
"</head>" & Constants.vbCrLf & _
"<body>" & Constants.vbCrLf & _
"the quick brown monkey jumps" & Constants.vbCrLf & _
"over the lazy dog." & Constants.vbCrLf & _
"</body></html>"
End Sub
Sub RemoveHTMLTags()
Dim s As String = "\<(html|/html|title|/title|head|/head|body|/body|link.*)\>"
RichTextBox1.Text = Regex.Replace(RichTextBox1.Text, s, "", RegexOptions.IgnoreCase)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
RemoveHTMLTags()
End Sub