Z
zdrakec
I need to be able to do a Regex.split on a csv file ignoring the comma
if it is inside a single quote. I have the regular expression working
in the RegexDesigner tool, but when I use it within vb.net it adds an
extra split on each of the commas as well.
Example:
Reg Ex = ,(?=([^']*'[^']*')*(?![^']*'))
String to split = " '1A', 9, 2884, 'Sally, is late', 'nothing'
Works fine in the designer but output in vb.net looks like
element(0) = '1A'
element(1) = ,
element(2) = 9
element(3) = ,
etc...
Any help will be greatly appreciated!!
Thanks,
zdrakec
if it is inside a single quote. I have the regular expression working
in the RegexDesigner tool, but when I use it within vb.net it adds an
extra split on each of the commas as well.
Example:
Reg Ex = ,(?=([^']*'[^']*')*(?![^']*'))
String to split = " '1A', 9, 2884, 'Sally, is late', 'nothing'
Works fine in the designer but output in vb.net looks like
element(0) = '1A'
element(1) = ,
element(2) = 9
element(3) = ,
etc...
Any help will be greatly appreciated!!
Thanks,
zdrakec