>>> ' Extract the tags >>> ' expC1 Content >>> Public Function ExtractTag(ByVal tcContent As String) As String >>> Dim lcContent As String = "" >>> Dim lnStart As Integer = 1 >>> Dim lnStop As Integer = 0 >>> >>> lcContent = Trim(tcContent) >>> >>> ' For as long as we have a beginning of a tag >>> While lnStart > 0 >>> lnStart = InStr(lcContent, "<") >>> >>> ' If we found it >>> If lnStart > 0 Then >>> lnStop = InStr(Mid(lcContent, lnStart), ">") >>> >>> ' If we do not have the end of the tag >>> If lnStop = 0 Then >>> Exit While >>> End If >>> >>> ' If this is at position 1 >>> If lnStart = 1 Then >>> lcContent = Mid(lcContent, lnStop + 1) >>> Else >>> lcContent = Left(lcContent, lnStart - 1) + Mid(lcContent, lnStart + lnStop) >>> End If >>> >>> Else >>> Exit While >>> End If >>> >>> End While >>> >>> ' Now, for all the rest, we need to make sure, that we do not have a single < in the string >>> lcContent = oApp.StrTran(lcContent, "<", "<") >>> >>> Return lcContent >>> End Function >>>>>>
>"<.*?>"
>
>>"<[^>]*>"
>
Good point. Actually I liked the StripTagsCharArray() method.....