Crirus,
In addition to the others comments, here is my short String Split FAQ:
---x--- cut here ---x---
There are three Split functions in VB.NET:
Use Microsoft.VisualBasic.Strings.Split if you need to split a string based
on a specific word (string). It is the Split function from VB6.
Use System.String.Split if you need to split a string based on a collection
of specific characters. Each individual character is its own delimiter.
Alternatively use System.Text.RegularExpressions.RegEx.Split to split based
on matching patterns.
---x--- cut here ---x---
As the others have demonstrated you want the second one.
Dim input As String = "aaaa#bbbbb*ccccc$dddd"
Dim values() As String
values = input.Split("#"c, "*"c, "$"c)
Note the String.Split method accepts a ParamArray of characters you can list
the chars as Fergus & I showed or you can use String.ToCharArray as Cor
demonstrated. Both are useful.
The c in "#"c indicates that the pound sign is a Char literal instead of a
String literal. Important to know if you are using Option Strict On.
Hope this helps
Jay
"Crirus" <Cr****@datagroup.ro> wrote in message
news:uP**************@TK2MSFTNGP12.phx.gbl...
There is a function somewhere to split a string with multiple tokens at a
time?
Say I have this:
aaaa#bbbbb*ccccc$dddd
I whould like to split it so the result whould be
aaaa
bbb
cccc
dddd
in a single call with array of delimiters #,*,&
--
Ceers,
Crirus
------------------------------
If work were a good thing, the boss would take it all from you
------------------------------