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