'Parsing a CSV file using Java and it stays in one line

Each line in the CSV file looks like this:

Bob Billy, 97669013000,05/22/2020,@@\978334032=1003,disclosure,4869t,floodcert437289-17894729523.pdf,1003,disclosure,3247t,floodcert,9728453,472947361.

After the @@\ to .pdf should all have the commas in them. This shouldnt be parsed. Just the end to beginning with pipes or something. Then from the comma after the .pdf to flood cert, should also keep all the commas, and the 7 and 9 digit number stay parsed.

Im new to Java and would like to see how this is done. I have an idea but its very ugly.



Solution 1:[1]

Can you edit your question and add the expected output?

Something like:

Bob Billy
97669013000
05/22/2020

And so on? Also, do you want to retain the markers @@\ etc, or drop them?

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Big Guy