Hello Friends,
I have an issue with a csv file that is separated by comma. The file should have 5 fields every time. The record delimiter of the file is \r\n but we are seeing that in few records the address field has \r\n too in them which is causing the line to break into two or more lines.
Please see the example file below:
The file should be read as follows:
firstname,lastname,address,city,state
example data is:
david,smith,123 Lindsay Street,columbus,oh
john,bush,5434A
Cresent Drive, Cleveland,oh
Micheal,Slater,34E Lobson
Street NE
Apt 3,Burbank,43017
Bill,thompson,1298 Bread Street,Cincinnati,oh
How should I code to convert the above file to the following:
david,smith,123 Lindsay Street,columbus,oh
john,bush,5434A Cresent Drive, Cleveland,oh
Micheal,Slater,34E Lobson Street NE Apt 3,Burbank,43017
Bill,thompson,1298 Bread Street,Cincinnati,oh
Please let me know if I need to provide further details.