in reply to Re: Regex woes...
in thread Regex woes...

I would refine the regex a bit. A number that begins with a zero to the left of the decimal point must be followed by the decimal point. So, even though the questioner does not specify this requirement, I would say:

(/^-?\d{1,3}\.\d/) && !(/^-?0\d+/)

I also point out for the questioner's benefit that $_ =~ /myregex/ is redundant. By default a regex operates on $_ when there is no explicit operand.

And, just for fun, let's allow the number to begin with a '+' or a '-'. Hence:

(/^[-+]?\d{1,3}\.\d/) && !(/^[-+]?0\d+/)