unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private-Deklarationen }
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
var satz,swort,ewort:string;
    ort:integer;
begin
satz:=edit1.text;
swort:=edit2.text;
ewort:=edit3.text;

ort:=pos(swort,satz);
delete(satz,ort,length(swort));
insert(ewort,satz,ort);

edit1.text:=satz;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
close;
end;



end.
