program Test;
{$MODE OBJFPC}
{$APPTYPE CONSOLE}
uses Classes, SysUtils, StrUtils;
var
S: string;
function ParseQuoted(const AnString: String): String;
const
Quote = '''';
DQuote = Quote + #32 + Quote;
PlusComma = ''',''';
begin
Result := StringReplace(AnString, DQuote, PlusComma, [rfReplaceAll]);
end;
begin
S := Chr(39) + '7 setae' + Chr(39) + ' ' + Chr(39) + '9 setae' + Chr(39) + ' ' + Chr(39) + '10 setae' + Chr(39);
WriteLn(S);
S := ParseQuoted(S);
WriteLn(S);
end.