/
^
(?:
[+-]? # optional sign
(?: # start a conditional group
\d+ # either a nonzero number of digits
| # or a decimal phrase
\d* # optional digits preceding the decimal
\.(?=\d) # a literal decimal followed by at least one digit
\d* # optionally some more