Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Reading in a delimited file with fields marked by double quote

807580Apr 19 2010 — edited Sep 14 2010
Hey folks,

I have a file I am trying to read in which has text in the format below:

"A", "B C", "D"

Each field is delimited by a comma and the field marker is a double quote. I tried using String Tokenizer but when I output my tokens, I get each field with a Double_quote around it and what I really need is just the actual text.

Should I just strip the double quotes after reading in the tokens or is there a smarter way of doing this?

Current Output - Field 1 - "A", Field 2 - "B C"
Output required - Field 1 - A , Field 2 - B C

Any help on what I should be doing here instead?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 12 2010
Added on Apr 19 2010
18 comments
605 views