I have a string which at some point contains the set of characters in the following format [123].
[123]
What I would like to do is get the characters between
Dim s As String = "foo [123]=ro bar" Dim i As Integer = s.IndexOf("[") Dim f As String = s.Substring(i + 1, s.IndexOf("]", i + 1) - i - 1)