Combining regular expressions

Make a regex for integer or decimal notation:
(integer OR decimal notation)
using the OR operator and parenthesis:
-?(\d+|(\d+\.\d*|\d*\.\d+))
Problem: 22.432 gives a match for 22
(i.e., just digitits? yes - 22 - match!)

previousnexttable of contents