< YOYO > Answer to String Manipulation
Code:
'add a listbox and a command button
'copy and run this code.
Option Explicit
Private Sub Command1_Click()
Dim myVar As String
Dim vCut As Variant, sTag As String, i As Integer
myVar = "<tag>Something</tag>sflnlcvnjnvbfog <tag>Something else</tag>asas;kfhkdfa etc etc etc <tag>damn this is...</tag>"
vCut = Split(myVar, "<")
For i = 0 To UBound(vCut)
sTag = Mid(vCut(i), InStrRev(vCut(i), "<") + 1) 'keep ending tag
sTag = Mid(sTag, InStrRev(sTag, ">") + 1)
vCut(i) = sTag
'this is for display only..checking ...remove it.
List1.AddItem vCut(i)
Next i
End Sub