Bug? [Closed] Regex.Split()

Ed Brown

Active Member
Licensed User
Longtime User
If I have the following string

a;b;c;;;f;;;

and I split this to get a String array the result is an array with just 6 elements in it. The last 3 elements (which would be empty strings) are not added to the array and this then leads to out of bounds exceptions.

The work around for me right now is to add some arbitrary value to the end of the string such as

a;b;c;;;f;;;end

and by doing so I'll get the desired result of an array containing 9 elements.
 

Ed Brown

Active Member
Licensed User
Longtime User
Hmm, ok.

Is it possible to update the documentation/help to indicate this?
 
Top