http://qs321.pair.com?node_id=163863


in reply to Splitting a comma-delimited string where a substring could contain commas

I'm curious as to why you ended up in this situation to begin with.

  1. Why do you need to have them split that way? (What is the ultimate goal you're trying to achieve using that data?)

  2. Do you have any control over how the initial data is structured? Smarter data structures make for easier maintenance.

I know this isn't the "answer" you were looking for, but if you can change the format of the data to something easier to work with, or if you can solve your problem without even having to parse it the way you think you need to, your maintenance programmer will thank you.