unit uTest_TRegExp;

interface

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
  RegExpr;

type

  { TForm1 }

  TForm1 = class(TForm)
    Button1: TButton;
    Edit1: TEdit;
    Memo1: TMemo;
    Memo2: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { private declarations }
  public
    { public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.lfm}

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
var
  rexp: TRegExpr;
begin

  rexp:= TRegExpr.Create;
  rexp.Expression:= edit1.Text;
  memo2.text:= rexp.Replace( memo1.Text, '', false);
  rexp.Free;
end;

end.

