Spliting A CSV VB?
Dec 2, 2011I have a string like
Query_1,ab563372363_C/R,100.00,249,0,0,1,249,1,249,1e-132, 460
Query_1,ab563372356_C/R,99.60,249,1,0,1,249,1,249,5e-131, 455
[code]......
I have a string like
Query_1,ab563372363_C/R,100.00,249,0,0,1,249,1,249,1e-132, 460
Query_1,ab563372356_C/R,99.60,249,1,0,1,249,1,249,5e-131, 455
[code]......
im spliting a text file.... the text file looks liek this....
table Driver
number 607
name WarriorSpare607
[code].....
How come
Dim str As String = 1 & vbNewLine & 2 & vbNewLine & 3
Dim s As String() = str.Split
For d As Integer = 0 To s.Count - 1
MsgBox(s(d))
Next
Turns out to be:
1
2
3
Instead of:
1
2
3
Lets say I have this in a directory:
music.mp3
music 1.mp3
music 2.mp3
[code].....
I have an Outlook.AppointmentItem property string which is a concatenation of dd/mm/yyyy and HH:MM:
.Start = Nz(Me.eventstart, "") & " " & Nz(Me.time, "")
I am trying to split a data field in VB using the split function.
The data field has the following character strings"&|:"
which I need to base my split on.
Dim elements As String() = Regex.Split(dataField, "&|:")
field1 = elements(1)
field2 = elements(2)
The field1 and field2 still have a trailing "&|" chracters.How do I check if the field1 and field2 have these trailing characters? How do I delete them?PS - I have tried "&\|:" as the delimiters in the split function which did not work.
I am using a thread to call a process which is spliting a text file into various text file and folder using the system.io , now when calling the Textsplit() with thread on click of a button i am getting the error below , how to use thread and why this error occurs.
Cross-thread operation not valid: Control 'txtbox_destn' accessed from a thread other than the thread it was created on.