procedure TForm1.Button4Click(Sender: TObject); var k: integer; begin for k:=1 to memo1.Lines.Count-1 do begin if AnsiPos('%', Memo1.Lines.Strings[k]) <>0 then begin // Edit1.Text := ? end; end; end; There is a loop in Button that watches every line in Memo. If the first character '%' is found, but how to make the Edit add all the characters after it until the same character is found?
Sample text in Memo:
% Here is some text needed to move it somewhere.%
What should appear in Edit:
Here is some text needed to move it somewhere.