0

I have a csv file with sample data like this

153,"Doe, John","","RBG","",10,"","","10/15/2017","Sunday","RESTDAY"," ",10,"","","","","","",0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,"",0.00,0.00,""

When I split it using the split() function in javascript like this. csvdata.split(",") it works well but I encountered a problem when the fullname is separated with comma like "Doe, John". Can anyone help me? Thanks in advance

5
  • Use a different delimiter to separate names then Commented Dec 28, 2017 at 1:28
  • 2
    Someone did it here with regex: stackoverflow.com/a/11457952/1306026 Commented Dec 28, 2017 at 1:28
  • Well that's only a useful suggestion if OP has the power to change the source... Commented Dec 28, 2017 at 1:29
  • the csv file I used was an output of another system so it is impossible for me to change the format of names Commented Dec 28, 2017 at 1:31
  • oh @JoshuaRubin thank you. It is there, I'm trying to search for hours. Thank you again :) Commented Dec 28, 2017 at 1:35

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.