program ExtractQuotedStrings;
uses
SysUtils, StrUtils;
var
S: string;
StartPos, EndPos: Integer;
begin
S := 'I like ''Pascal'', ''C'', ''C#'' ''Java'' and ''Python''.';
StartPos := 1;
while True do
begin
StartPos := PosEx('''', S, StartPos);
if StartPos = 0 then Break;
EndPos := PosEx('''', S, StartPos + 1);
if EndPos = 0 then Break;
Writeln(Copy(S, StartPos + 1, EndPos - StartPos - 1));
StartPos := EndPos + 1;
end;
end.
{
run:
Pascal
C
C#
Java
Python
}