Advertisement
MadManMarkAu

Regex for HTML

Apr 26th, 2012
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 0.40 KB | None | 0 0
  1.     Imports System.Text.RegularExpressions
  2.      
  3.         Dim mcMatches As MatchCollection
  4.         Dim mMatch As Match
  5.         Dim strInput As String = "<html> <head> </head><body><a href=""blah"" /><p>This is a paragraph</p></body></html>"
  6.  
  7.         mcMatches = Regex.Matches(strInput, "<(/?[A-Za-z][^>]*?)>")
  8.         For Each mMatch In mcMatches
  9.             MsgBox(mMatch.Groups(1).Value)
  10.         Next
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement