Dim s As String = "一二三四五AAA00000六七八" For i As Integer = 0 To s.Length -3 If s(i) = s(i+1) AndAlso s(i) = s(i+2) Then If s(i+3) = s(i+4) AndAlso s(i+3) = s(i+5) AndAlso s(i+3) = s(i+6) AndAlso s(i+3) = s(i+7) Then messagebox.show(s.SubString(i,8)) Exit For End If End If Next