Current Usage:
TCSVParser.ExtractFields(const S: string; pFieldList: TStrings);
Is it able to parse correct these kinds of problems?
DelimeterChar := ',';
QuoteChar := '''';
(1)
field 1, field 2, field 3, field 4
into 4 values:
field 1
field 2
field 3
field 4
note: obviously!
(2)
field 1, 'field 2, field 3', field 4
into 3 values:
field 1
field 2, field 3
field 4
note: ignore DelimiterChar within correct quote char pair.
(3)
field 1, 'field 2', field 3, field 4
into 4 values:
field 1
field 2
field 3
field 4
note: auto detect quote char availability.
(4)
field 1, field''2, field 3, field 4
into 4 values:
field 1
field'2
field 3
field 4
note: double quote char as single quote char value.
(5)
field 1, 'field' 2, field 3, field 4
into 4 values:
field 1
'field' 2
field 3
field 4
note: incorrect quote char position considered as part of the value.
(6)
field 1, 'field 2, field 3, field 4
into 4 values:
field 1
'field 2
field 3
field 4
note: incorrect quote char position considered as part of the value.
(7)
field 1, 'field 2, field 3, field 4
into 2 values:
field 1
field 2, field 3, field 4
note:
- incorrect quote char considered as single value.
- case (6) and (7) can be set via property StrictQuoteCharPair: boolean;
If your method above is able to solve those problems, then I'm very interested
to know the source code because I'm still unable to solve the last three
problems. :)
-Bee-
has Bee.ography at:
http://beeography.wordpress.com
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives