I know we can split the string in java using split()
method of String
class but my scenario is, I have a string like
Mega ,Bytes, "house No. 201, ABC Street, Pune, India", 23, Student
When I am spliting the string using row.split(",")
The output is
Mega
Bytes
"house No. 201
ABC Street
Pune
India"
23
Student
I want "house No. 201, ABC Street, Pune, India" as a single string. Please suggest how can I do this. One way to do this take splitted string array elements and concatenate them into single string. but the fields inside two double qoute("") the fields may differ, sometimes 3 or 4 fields combination. So how can I do this. Please suggest the way to do this