Making the regex more compact

A pattern for integer or decimal notation:
-?((\d+\.\d*|\d*\.\d+)|\d+)
Can get rid of an OR by allowing the dot and digits behind the dot be optional:
-?(\d+(\.\d*)?|\d*\.\d+)
Such a number, followed by an optional exponent (a la e+02), makes up a general real number (!)
-?(\d+(\.\d*)?|\d*\.\d+)([eE][+\-]?\d+)?

previousnexttable of contents