print "$1\n" if $number =~ m/ ^( [\d.-]* \d [\d.-]* )$ /x; #### $number =~ /^([\d.-]*\d[\d.-]*)$/ and print "$1\n";