function TForm1.ApenasNumeros(Const Texto:String):String; var I: integer; S: string; begin S := ''; for I := 1 To Length(Texto) Do begin if (Texto[I] in ['0'..'9']) then begin S := S + Copy(Texto, I, 1); end; end; result := S; end;