| | |
reading in .dat file data into an array - keeping whitespaces
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2007
Posts: 3
Reputation:
Solved Threads: 0
Hi ,
What do I need to modify in the "System.Text.RegularExpressions.Regex.Split(contents, "\\s+", RegexOptions.None);" so the string will also keep whitespaces?
For example, in the .dat file you have:
Hello Word Test1 Test2 Test3
If you noticed, I have whitespaces between each words, I want to keep that.
so
string[0] = Hello
string[1] = " "
string[2] = Word
string[3] = " "
string[4] = Test1
string[5] = " "
..
..... and so on. Can this be done?
What do I need to modify in the "System.Text.RegularExpressions.Regex.Split(contents, "\\s+", RegexOptions.None);" so the string will also keep whitespaces?
For example, in the .dat file you have:
Hello Word Test1 Test2 Test3
If you noticed, I have whitespaces between each words, I want to keep that.
so
string[0] = Hello
string[1] = " "
string[2] = Word
string[3] = " "
string[4] = Test1
string[5] = " "
..
..... and so on. Can this be done?
![]() |
Similar Threads
- Reading .dat file data into an array (C#)
- Reading .dat file (Visual Basic 4 / 5 / 6)
Other Threads in the C# Forum
- Previous Thread: Reading .dat file data into an array
- Next Thread: Do u have it in you ??? ....:->>
Views: 1293 | Replies: 0
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access ado.net algorithm array barchart bitmap box broadcast button buttons c# chat check checkbox class client code color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development drawing encryption enum event excel file files form format ftp function gdi+ http httpwebrequest image index input java list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post programming radians regex remote remoting resource richtextbox save saving server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





