warn "has nondigits" if /\D/;
warn "not a natural number" unless /^\d+$/;
warn "not an integer" unless /^-?\d+$/
warn "not an integer" unless /^[+-]?\d+$/;
warn "not a decimal number" unless /^-?\d+\.?\d*$/
warn "not a decimal number" unless /^-?(?:\d+(?:\.\d*)?|\.\d+)$/;
warn "not a C float" unless /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/;
use Regexp::Common;
$RE{num}{int};
$RE{num}{int}{-sep=>',?'};
$RE{num}{int}{-sep=>'.'}{-group=>4};
$RE{num}{int}{-base=>8};
$RE{num}{int}{-sep=>","}{-group=3};
$RE{num}{int}{-sep=>',?'}{-group=3};
$RE{num}{real}
$RE{num}{roman}
$RE{num}{square}