14-01-2016, 05:04 PM
(14-01-2016, 02:15 PM)Agmcz كتب : وعليكم السلام
هذا حل
PHP كود :function text_p(const text, stopdr: string): string;
var
I, P: Cardinal;
SL: TStringList;
begin
Result := '';
SL := TStringList.Create;
try
SL.Text := text;
for I := 0 to SL.Count - 1 do
begin
P := Pos(stopdr, SL[I]);
if P > 0 then
SL[I] := Copy(SL[I], 1, P-1);
end;
Result := SL.Text;
finally
SL.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
Memo2.Text := text_p(Memo1.Text, '"');
end;
وعليكم السلام
جربت هذا الكود ولكنه نسخ النص قبل علامة التنصيص من أول كل سطر فقط الى Memo2
والمطلوب هو نسخ النص الموجود داخل علامة التنصيص (") فقط وتجاهل باقى النصوص

