0

I am trying to separate the characters of string.

 Dim res As String
            res = "1+2+3+4+")
            tempArr = Regex.split("\+", res)

I am using this code to convert the string into array.Is it correct ? and also i need to know the count of the array. How it possible to get the count of the array ?

Sino Thomas
  • 141
  • 1
  • 7
  • 22

1 Answers1

2

Your code is correct.

Dim res As String = "1+2+3+4+"
Dim numbers() As String = Regex.Split("\+", res)
Log(numbers.Length)
For Each n As String In Numbers
  Log(n)
Next
Erel
  • 1,802
  • 2
  • 15
  • 58