Table of Contents

Regex - Numbers - Integers

Positive Integer

^\d+$

or

^[1-9]\d*|0$

Negative Integer

^-[1-9]\d*|0$

or

^((-\d+)|(0+))$

Positive Integer, excluding 0

^[1-9]\d*$

or

^([1-9][0-9]*){1,3}$

or

^\+?[1-9][0-9]*$

Negative Integer, excluding 0

^-[1-9]\d*$

or

^\-[1-9][0-9]*$