1

I have the following string:

"367","90","Hey, this is a "cool" company","","","Anonymous"

I want to get this separted into a string array so according to this solution I tried

Dim strSource As String = """367"",""90"",""Hey, this is a "cool" company"","""","""",""Anonymous"""
Dim parts As String() = strSource.Split(New String() {"", ""}, StringSplitOptions.None)

but something seems wrong since I get only one string element instead of six I want to:

 1. 367
 2. 90
 3. Hey, this is a "cool" company
 4. 
 5. 
 6. Anonymous
Community
  • 1
  • 1
ruedi
  • 5,365
  • 15
  • 52
  • 88
  • Maybe it's a typo but the split separtor has a blank, and the string hasn't it. "", "" -> "","" – Alpha75 Jun 27 '16 at 11:17

1 Answers1

1

You haven't phrased the string split pattern correctly:

Dim strSource As String = """367"",""90"",""Hey, this is a ""cool"" company"","""","""",""Anonymous"""
Dim parts As String() = strSource.Split(New String() {""","""}, StringSplitOptions.None)
Neal
  • 801
  • 1
  • 9
  • 21