Hi Chris,
TStringList.DelimitedText also breaks on spaces and not just the
Delimiter. Annoying, I know :) You're best bet is to parse the line
manually without using DelimitedText. I vaguely recall there being a
function in SysUtils that DelimitedText uses underneath to do the
parsing and that it allows you to customise the characters to break on,
but its name escapes me at the moment. I have even vaguer memories that
it was problematic as well though.
Regards,
Darren
chris.mo...@biuk.co.uk wrote:
Please help me with this tab file parsing. I don't create the file, I'm
just supposed to read it. The text is not enclosed in " except where
the text has a ,
MyLine = some^text#some^more^text#99#99####99#last^bit^of^text
^ == a space
# == a TAB
My code =
MyNL:=tStringList.Create;
MyNL.Delimiter:=#9;
MyNL.DelimitedText:=MyLine;
What I expect :
some^text
some^more^text
99
99
<null>
<null>
<null>
<null>
99
last^bit^of^text
What I get:
Some
text
some
more
text
99
Thanks for any input - Chris
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi