Quote Originally Posted by stanav View Post
As Negative0 already suggested, if you don't wnat to use regex, you can use the string.indexof function. Something like this:
Code:
Dim startText As String = "whatever the start text here"
Dim endText as string = "whatever the end text here"
Dim sourceText as string = "the string you want to search from here"
Dim startIndex as integer = sourceText.IndexOf(startText)
Dim textInBetween As String = "Not found"
If startIndex >= 0 Then
      sourceText = sourceText.SubString(startIndex)
      If sourceText.IndexOf(endText) > 0 Then
          textInBetween = startText.Substring(0, sourceText.IndexOf(endText))
      End If
End If
MessageBox.Show(textInBetween)
That's giving me
Index and length must refer to a location within the string. Parameter name: length