Help with trimming characters?

hazejean

Regular
Joined
Jul 11, 2003
Messages
68
I have situation where i am reading a list in text in following form:
[string1];[string2];[string3];[string4]

I want to extract "string1" "string2" etc

I did a split using ;...code follows

Dim strstring21 As String = pretext(2)
Dim s21() As String = Split(strstring21, ";")
For x = LBound(s21) To UBound(s21)
linkpos(x) = s21(x)
Next

THEN I need to remove left and right brackets from the strings in linkpos array. Ideas?

Thanks
 
You could use the Replace method of a string:
Visual Basic:
dim str As String = "[string1];[string2]"
str = str.Replace("[", "")
 
Back
Top