Re: [GENERAL] Regular expression that splits CSV string into table

2010-09-11 Thread Jeff Davis
On Fri, 2010-09-10 at 18:11 -0700, Nick wrote: I dont mind if the commas are at the beginning and end, im more concerned about three,four staying in one row because its surrounded by quotes. -Nick It doesn't sound like a regex is the best solution here. Why not write a function in a language

[GENERAL] Regular expression that splits CSV string into table

2010-09-10 Thread Nick
What would be the regexp_split_to_table pattern that splits a comma separated string into a table? Im having trouble when a string contains commas or there are commas at the beginning or end String ',one,two,''three,four'',five,six,' Should return ,one two three,four five six, -- Sent via

Re: [GENERAL] Regular expression that splits CSV string into table

2010-09-10 Thread bricklen
On Fri, Sep 10, 2010 at 3:43 PM, Nick nboutel...@gmail.com wrote: What would be the regexp_split_to_table pattern that splits a comma separated string into a table? Im having trouble when a string contains commas or there are commas at the beginning or end String

Re: [GENERAL] Regular expression that splits CSV string into table

2010-09-10 Thread Nick
Yes, that gets down to the root of my question... what is the expression that would properly split the values? -Nick On Sep 10, 4:43 pm, brick...@gmail.com (bricklen) wrote: On Fri, Sep 10, 2010 at 3:43 PM, Nick nboutel...@gmail.com wrote: What would be the regexp_split_to_table pattern that

Re: [GENERAL] Regular expression that splits CSV string into table

2010-09-10 Thread Alvaro Herrera
Excerpts from Nick's message of vie sep 10 20:36:24 -0400 2010: Yes, that gets down to the root of my question... what is the expression that would properly split the values? -Nick The only idea that comes to mind right now is to remove them before processing the rest of the string, and put

Re: [GENERAL] Regular expression that splits CSV string into table

2010-09-10 Thread Nick
I dont mind if the commas are at the beginning and end, im more concerned about three,four staying in one row because its surrounded by quotes. -Nick On Sep 10, 6:03 pm, alvhe...@commandprompt.com (Alvaro Herrera) wrote: Excerpts from Nick's message of vie sep 10 20:36:24 -0400 2010: Yes,