in reply to Re^4: need help with a Regex
in thread need help with a Regex

TedPride,
That is why I suggested Scalar::Util's 'looks_like_number'. For instance, your regex misses at least numbers in scientific notation. Here is the applicable code:
# Copied from Scalar::Util sub looks_like_number { local $_ = shift; # checks from perlfaq4 return $] < 5.009002 unless defined; return 1 if (/^[+-]?\d+$/); # is a +/- integer return 1 if (/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/); # +a C float return 1 if ($] >= 5.008 and /^(Inf(inity)?|NaN)$/i) or ($] >= 5.006 +001 and /^Inf$/i); 0; }

Cheers - L~R