I have a comma delimited file with fields that have commas. I don't know how to get the split function form splitting when a field has a comma in it. I tried to put quotes around string values but the split function still splits into an element in an array.
my code
strInput="123,testdata,testdata with a comma ,,last field"
arrArray = strInput.Split(",")
what I want is:
arrArray(0)=123
arrArray(1)=testdata
arrArray(2)=testdata with a comma ,
arrArray(3)=last field
what I get is:
arrArray(0)=123
arrArray(1)=testdata
arrArray(2)=testdata with a comma
arrArray(3)=
arrArray(4)=last field
Can someone help?
Thanks,
James
my code
strInput="123,testdata,testdata with a comma ,,last field"
arrArray = strInput.Split(",")
what I want is:
arrArray(0)=123
arrArray(1)=testdata
arrArray(2)=testdata with a comma ,
arrArray(3)=last field
what I get is:
arrArray(0)=123
arrArray(1)=testdata
arrArray(2)=testdata with a comma
arrArray(3)=
arrArray(4)=last field
Can someone help?
Thanks,
James