Function GetStringBetween(ByVal Str1 As String, ByVal str2 As String, ByVal str3 As String) As String
'textbox.Text = GetStringBetween(sData, "first", "last")
Dim foundstr As String = ""
Dim values() As String = Split(Str1, str2, , CompareMethod.Text)
If values.Length >= 2 Then
values = Split(values(1), str3, , CompareMethod.Text)
If values.Length >= 2 Then
foundstr = values(0)
End If
End If
Return foundstr
End Function
|