Using String.IndexOf and String.Substring...
VB Code:
Dim TestString As String = "blah blah test12345678901234567890123456789012end"
Dim SearchString As String = "test"
Dim Result As Integer = TestString.IndexOf(SearchString, 0)
If Result >= 0 Then
MessageBox.Show(TestString.Substring(Result, SearchString.Length + 32))
End If
Using Regex...
VB Code:
Dim TestString As String = "blah blah test12345678901234567890123456789012end"
Dim SearchString As String = "test"
Dim RegexPattern As String = SearchString & ".{32}"
Dim MyMatches As System.Text.RegularExpressions.MatchCollection = _
System.Text.RegularExpressions.Regex.Matches(TestString, RegexPattern)
For Each Match As System.Text.RegularExpressions.Match In MyMatches
MessageBox.Show(Match.Value)
Next