ähm... du weist einer caption nen real-typ zu?
also ich würds so machen:
Delphi-Quellcode:
function CleanString(s: String): String;
var
I: Integer;
begin
result := '';
for I := 1 to length(s) do
if s[i] in ['0'..'9', '.'] then
result := result + s[i];
end;