By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,678 Members | 1,368 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,678 IT Pros & Developers. It's quick & easy.

Getting comma separated values from a string

P: n/a
RD
S= myTxtStrean.Readline gives me a string. How do I extract the fields
separated by commas for instance

1,123456,345632,7876543
1,234567890,5432,87654
(values are not each the same length)

Thanks for any help

Bob
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
a
Dim arr() As String

arr = S.Split(",")

kevin

"RD" <no****@nospam.net> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
S= myTxtStrean.Readline gives me a string. How do I extract the fields
separated by commas for instance

1,123456,345632,7876543
1,234567890,5432,87654
(values are not each the same length)

Thanks for any help

Bob

Nov 20 '05 #2

P: n/a
* "RD" <no****@nospam.net> scripsit:
S= myTxtStrean.Readline gives me a string. How do I extract the fields
separated by commas for instance

1,123456,345632,7876543
1,234567890,5432,87654
(values are not each the same length)


Have a look at 'String.Split' and 'Strings.Split'.

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.