Subject: | '.' is recognized as a number by $RE{num}{real} |
perl -MRegexp::Common -e 'my($n)= "A period . is not a number like 0.47"
=~ /($RE{num}{real})/; print "Got $n\n";'
Got .
The RE{num}{real} finds that a stand-alone period is sufficient to
constitute a number. I believe that a digit must be adjacent to at
least one side of a period to qualify as a number.
The current REX is
(?:(?i)(?:[+-]?)(?:(?=[0123456789]|[.])(?:[0123456789]*)(?:(?:[.])(?:[0123456789]{0,}))?)(?:(?:[E])(?:(?:[+-]?)(?:[0123456789]+))|))
I believe this fixes the problem
(?:(?i)(?:[+-]?)(?:[0123456789]+(?:[.][0123456789]*)?|[.][0123456789]+)(?:(?:[E])(?:(?:[+-]?)(?:[0123456789]+))|))