Click here to Skip to main content
15,913,055 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralMDI CHILD??? Pin
klaire15-Oct-03 15:54
klaire15-Oct-03 15:54 
GeneralTranslating PIDs into program names Pin
Asad Hussain3-Oct-03 10:59
Asad Hussain3-Oct-03 10:59 
Generalmerging data from 2 XML files Pin
r i s h a b h s2-Oct-03 20:40
r i s h a b h s2-Oct-03 20:40 
Generaldatasets disappear from designer Pin
JimWDurbin2-Oct-03 9:11
JimWDurbin2-Oct-03 9:11 
QuestionHow to open at run time a Word document in a .NET Crystal Report Pin
ordepavlis2-Oct-03 1:39
ordepavlis2-Oct-03 1:39 
GeneralVery strange!! Can't make any change to work in VB Pin
AbsolutFreedom1-Oct-03 10:00
AbsolutFreedom1-Oct-03 10:00 
GeneralRe: Very strange!! Can't make any change to work in VB Pin
Nick Seng1-Oct-03 17:18
Nick Seng1-Oct-03 17:18 
GeneralCSV parsing with regex Pin
madfiddlerchris1-Oct-03 6:23
madfiddlerchris1-Oct-03 6:23 
I'm trying to parse a CSV string and examples I've found so far do not appear to work with VB.NET

The regular expression I'm trying to work with is
,(?=([^"]*"[^"]*")*(?![^"]*"))


So if I'm coding this in VB.NET I have to replace the double quotes with two double quotes right?....

Therefore, my code is using a simple form with two controls as follows...


Dim re As Regex = New Regex(",(?=([^""]*""[^""]*"")*(?![^""]*""))", RegexOptions.Compiled)
Dim myArray() As String = re.Split(TextBox1.Text)
TextBox2.Clear()
Dim i As Integer
For i = 0 To UBound(myArray)
TextBox2.Text = TextBox2.Text & myArray(i) & vbCrLf
Next



Now if TextBox1 is A,B,C it works as expected

If any of the values have double quotes round them it all goes pear shaped.

Eg. a,"substr1,substr2",3.14,"hello" comes out with 7 elements in my array
a
,3.14,"hello"
"substr1,substr2"
3.14,"hello"
3.14
"hello"
"hello"


this is doing my nut! I've been looking at reference books and still can't get it to work.

Is there someone out there that's going to be my saviour?!?!

cheers
mf
GeneralPrinting Pin
Member 61576230-Sep-03 22:25
Member 61576230-Sep-03 22:25 
GeneralRe: Printing Pin
mikasa1-Oct-03 2:42
mikasa1-Oct-03 2:42 
GeneralRe: Printing Pin
Mike Ellison1-Oct-03 10:08
Mike Ellison1-Oct-03 10:08 
GeneralProperties Pin
mikasa30-Sep-03 5:54
mikasa30-Sep-03 5:54 
GeneralRe: Properties Pin
Nick Seng30-Sep-03 16:27
Nick Seng30-Sep-03 16:27 
GeneralRe: Properties Pin
mikasa1-Oct-03 2:39
mikasa1-Oct-03 2:39 
GeneralRe: Properties Pin
Nick Seng1-Oct-03 17:12
Nick Seng1-Oct-03 17:12 
GeneralRe: Properties Pin
mikasa2-Oct-03 3:32
mikasa2-Oct-03 3:32 
GeneralRe: Database NULL values Pin
Ian Darling30-Sep-03 5:41
Ian Darling30-Sep-03 5:41 
Generalrow selection in flexgrid Pin
Giwan29-Sep-03 4:49
sussGiwan29-Sep-03 4:49 
GeneralCalling unmanaged dll from VB .NET Pin
Asad Hussain29-Sep-03 4:20
Asad Hussain29-Sep-03 4:20 
Generalsearch db and display Pin
Inneedofluv28-Sep-03 17:55
Inneedofluv28-Sep-03 17:55 
GeneralUPGRADE_WARNING message removal Pin
JimWDurbin27-Sep-03 10:43
JimWDurbin27-Sep-03 10:43 
GeneralSocket programming problem Pin
Asad Hussain27-Sep-03 9:22
Asad Hussain27-Sep-03 9:22 
GeneralRe: Socket programming problem Pin
mikasa27-Sep-03 10:01
mikasa27-Sep-03 10:01 
QuestionUrgent and Interesting!!! EventHandling Bug!!!???? Pin
Yurcus27-Sep-03 3:25
Yurcus27-Sep-03 3:25 
AnswerRe: Urgent and Interesting!!! EventHandling Bug!!!???? Pin
Dave Kreskowiak27-Sep-03 4:59
mveDave Kreskowiak27-Sep-03 4:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.