F
flarosa
Hi,
Is there an easy way to parse a line of text which may contain quoted
instances of the delimiting character?
For example,
1200,Bob's Ties,400 Atwood Avenue
1201,"Mary, Jane and Associates",250 Washington St.
In the 2nd line, I'd want the whole string "Mary, Jane and Associates"
to parse as one token.
The two simple ways I know of parsing text in java - StringTokenizer
and String.split() - would end up parsing the 2nd line into four tokens
instead of 3.
Thanks,
Frank
Is there an easy way to parse a line of text which may contain quoted
instances of the delimiting character?
For example,
1200,Bob's Ties,400 Atwood Avenue
1201,"Mary, Jane and Associates",250 Washington St.
In the 2nd line, I'd want the whole string "Mary, Jane and Associates"
to parse as one token.
The two simple ways I know of parsing text in java - StringTokenizer
and String.split() - would end up parsing the 2nd line into four tokens
instead of 3.
Thanks,
Frank