Dim str1 As String = "One fish two fish red fish blue fish" Dim pat As String = "(?<1>\w+)\s+(?<2>fish)\s*" Dim r As New Regex(pat, RegexOptions.IgnoreCase) Textbox1.text = r.Match(str1).ToString ' Textbox1 is "One fish"