I want to match either a Decimal or an Integer. Here are my definitions:

Zero: Literally matches 0. It cannot be positive or negative.
Integer: Any number of digits that do not lead with 0 with the option for a positive or negative sign.
Decimal: Any number of digits that do not lead with 0 with the option for a decimal that is followed by any number of digits that do not trail with 0, also with the option for a positive or negative sign.

The closest that I could come up with was:
Code:
[+-]?([1-9]\d*(\.\d*[1-9])?|0\.\d*[1-9]+)|\d+(\.\d*[1-9])?
Fiddle: http://www.regexr.com/3da5e

The issue is that it does not account for leading 0's and I feel as though the pattern is cumbersome. What would y'all do to not only address the leading zeros but also trim down the pattern too?