my @numbers= grep { s/\.$//; /\d/ } $text =~ /([-+\d.eE]+)/g;