I just ran into a rather annoying problem whilst trying to parse some text data files. Each record has ASCII text fields delimited on each line by the ASCII pipe symbol '|'.
Dim Crowd As String = "Joe Bloggs|Alan Smith|George Brown"
Dim People() As String = Regex.Split(".", Crowd)
Dim Person As List
Person.Initialize2(People)
Dim count As Int
For count = 0 To Person.Size -1
Log(Person.Get(count)) 'unexpected results!
Next
Each record has ASCII text delimited by the pipe symbol '|'. Unfortunately trying to parse this symbol using Regex.Split("|", Text) produces unexpected results. This is very unfortunate as this delimited format was once widely used.
It appears that commas work fine but attempting to use other ASCII meta-characters produces unexpected results or errors.
Which ASCII characters work as delimiters and which do not?