in reply to classifying data
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: classifying data
by Art_XIV (Hermit) on Jan 19, 2004 at 16:45 UTC | |
by Abigail-II (Bishop) on Jan 19, 2004 at 16:50 UTC | |
by Art_XIV (Hermit) on Jan 19, 2004 at 17:40 UTC |