I am using the following code, to grab the text between (text here) and [text here]
Dim strWriters as string = "(somebody here) [Something else here]"
Dim Regex As Regex = New Regex("\(.*?\)")
Dim Regex1 As Regex = New Regex("\[.*?\]")
Dim matches As MatchCollection = Regex.Matches(strWriters)
Dim matches1 As MatchCollection = Regex1.Matches(strWriters)
Dim count As Integer = matches.Count
Dim counts As Integer = matches1.Count
Dim s0 As String = matches(0).Value.ToString
Dim s1 As String = matches1(0).Value.ToString
The above works great, however. I want to eliminate the use of the Parentheses (text here) altogether.
I still need to grab the text in the brackets, so the brackets have to remain.
Like the code above.
Grab the "somebody here" from the string
And then, another one will grab the Something else here.
Dim strWriters as string = "somebody here [Something else here]"
Assistance on this would be great.
Thanks in advance.