I posted question few years ago regarding how to parse tokens from quote qualified (or not) comma delimited string.
I received superb answer from @mathguy Parse Quote Qualified Delimited String - Oracle Forums
I require variation to count number of fields in quote qualified (or not) comma delimited string. The regular expression used as basis of parsing I cannot get quote right for counting.
Rules
- Fields can be null ie ,X or ,"X" is two fields of 1. null 2. X
- Quote qualified fields can contain commas, ie ,A,"B","C,D" is four fields of 1. null 2. A 3. B 4. C,D
- Extreme case: ,A,"B","C,D", is five fields of 1. null 2. A 3. B 4. C,D 5. null
Thanks