regex:numbers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
regex:numbers [2022/09/20 23:13] – peter | regex:numbers [2022/09/20 23:13] (current) – peter | ||
---|---|---|---|
Line 20: | Line 20: | ||
---- | ---- | ||
- | |||
- | Positive Integer, excluding 0 | ||
- | |||
- | < | ||
- | ^[1-9]\d*$ | ||
- | </ | ||
- | |||
- | or | ||
- | |||
- | < | ||
- | ^([1-9][0-9]*){1, | ||
- | </ | ||
- | |||
- | or | ||
- | |||
- | < | ||
- | ^\+? | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | Negative Integer, excluding 0 | ||
- | |||
- | < | ||
- | ^-[1-9]\d*$ | ||
- | </ | ||
- | |||
- | or | ||
- | |||
- | < | ||
- | ^\-[1-9][0-9]*$ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | Positive Integer | ||
- | |||
- | < | ||
- | ^\d+$ | ||
- | </ | ||
- | |||
- | or | ||
- | |||
- | < | ||
- | ^[1-9]\d*|0$ | ||
- | </ | ||
- | |||
- | ---- | ||
- | |||
- | Negative Integer | ||
- | |||
- | < | ||
- | ^-[1-9]\d*|0$ | ||
- | </ | ||
- | |||
- | or | ||
- | |||
- | < | ||
- | ^((-\d+)|(0+))$ | ||
- | </ | ||
- | |||
- | ---- | ||
regex/numbers.1663715582.txt.gz · Last modified: 2022/09/20 23:13 by peter