2

Possible Duplicate:
Javascript code to parse CSV data

Simple and straight, if I have a string like: 1001,"abc, xyz", 34

I want it to split into 3 strings not 4. If I use split(','), it splits abc and xyz into two strings however I want it as a single string as it is inside double quotes.

So my final outcome should be:

1001
abc, xyz
34

What should I use inside split(), so that I can get expected output?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Vagish
  • 61
  • 1
  • 6
  • Someone else's answer: http://stackoverflow.com/questions/1293147/javascript-code-to-parse-csv-data – emurano Aug 03 '12 at 23:28
  • @emurano It helps the moderators if you flag the question as duplicate, rather than just commenting. – Neil Aug 03 '12 at 23:32

0 Answers0