Or you could take its regex and modify it to have an optional leading dollar sign.use Regexp::Common; $has_dollar_sign = $str =~ s/^([-+]?)\$/$1/; if ($str =~ /^$RE{num}{decimal}{-sep => ','}{-keep}$/) { $is_numeric = 1; $sign = $2; $has_decimal_point = $5 ? 1 : 0; $has_commas = $str =~ /,/ }
Abigail
In reply to Re: classifying data
by Abigail-II
in thread classifying data
by sweetblood
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |