Functie heeft een verwijzing nodig.
In de VBE, Extra | Verwijzingen
Microsoft VBScript Regular Expressions 5.5
Handige functie om de HTML tags uit een webpage te verwijderen.
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "<(.|\n)+?>"
'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strHTML, "")
'Replace all < and > with < and >
strOutput = Replace(strOutput, "<", "<")
strOutput = Replace(strOutput, ">", ">")
'Return the value of strOutput
stripHTML = strOutput
Set objRegExp = Nothing
End Function