Remove HTML tags
RegEx can be a bit complex, but it sure can do a lot with just a few params. This function will strip all html tags in a string and return the enclosed data. | is the default delimiter.
Public Shared Function RemoveHTMLTags( _ByVal strText As String, _Optional ByVal strDelimiter As String = "|") _As StringReturn Regex.Replace(strText, "<(.|\n)+?>", strDelimiter)End FunctionstrData = RemoveHTMLTags("<td>1</td><td>2</td><td>3</td>")strData equals "1|2|3"- Download this code: RemoveHTMLTags.txt
Trackback URI |