in reply to Re: Regex woes...
in thread Regex woes...
(/^-?\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+/)
|
|---|