Here's a sample of my csv file
5,DENTISTRY,MAJOR,null,TRUE
6,DERMATOLOGY,MAJOR,null,TRUE
7,"EYE, EAR, NOSE, THROAT",MAJOR,null,TRUE
8,EMERGENCY MEDICINE,MAJOR,null,TRUE
How do I split this csv file while ignoring the comma inside double quotes?
Here's a sample of my csv file
5,DENTISTRY,MAJOR,null,TRUE
6,DERMATOLOGY,MAJOR,null,TRUE
7,"EYE, EAR, NOSE, THROAT",MAJOR,null,TRUE
8,EMERGENCY MEDICINE,MAJOR,null,TRUE
How do I split this csv file while ignoring the comma inside double quotes?
You should use a proper CSV parsing library, rather than trying to simply split the lines.
Parsing CSV well is harder than it initially seems, and you're much better off using a high quality, working library.
You can find recommendations about CSV libraries here:
CSV API for Java