function TfrmMain.get(Text :
String):
String;
var i : integer;
Flag : Boolean;
begin
result := Text;
i := 0;
Flag := False;
while i < Length(result)
do
begin
if result[i] = '
"'
then
Flag :=
not Flag;
if (result[i] = #13)
and (result[i+1] = #10)
and (Flag)
then
begin
delete(result,i,2);
result := copy(result, 0, i-1)+'
'+ Copy(result, i, Length(result));
dec(i);
end;
inc(i);
end;
end;
procedure TfrmMain.Button1Click(Sender: TObject);
var i : Integer;
sl : TStrings;
space : TStrings;
result : TStrings;
begin
sl := TStringList.Create;
space := TStringList.Create;
result := TStringList.Create;
sl.LoadFromFile('
...');
for i := 0
to sl.Count - 1
do
begin
space.Add(StringReplace(sl[i], '
', #13#10, [rfReplaceAll]));
result.Add(StringReplace(space[i], '
,', #13#10, [rfReplaceAll]));
end;
for i := 0
to sl.Count - 1
do
begin
Memo1.Lines.Add(Get(result[i]));
end;
sl.Free;
end;