Attribute VB_Name = "Program" Option Explicit Public Sub Main() Dim cut As StringIndex Const txt = "The brown fox jumped over the lazy dog" Set cut = StringFinder.Find(txt, "FOX", CaseInsensitive:=True) If cut Then Debug.Print "->" & cut.Before & "<-" Debug.Print "->" & cut.After & "<-" Debug.Print "->" & cut.TakeBackward(Skip:=1, Count:=5) & "<-" Debug.Print "->" & cut.TakeForward(Skip:=1, Count:=6) & "<-" Debug.Print "->" & cut.What & "<-" Else Debug.Print "Not found!" End If Set cut = StringFinder.Between(txt, "brown", "jumped") Debug.Print "->" & cut.Before & "<-" Debug.Print "->" & cut.After & "<-" Debug.Print "->" & cut.What & "<-" End Sub