Var s: String; s := ''; for i := 1 to Length(Edit1.Text) do if Edit1.Text[i] in ['0'-'9'] then s := s + Edit1.Text[i];