regex:numbers
This is an old revision of the document!
Regex - Numbers
Numbers only
^[0-9]*$
2. 5 digits only
3. Minimum 3 digits
4. 2-5 digits
5. 0 and numbers not begin with 0
(0 |
---|
6. Numbers not begin with 0 and maximum 2 decimals
7. Positive or Negative numbers with maximum 2 decimals
8. Positive, Negative numbers and any decimal length
(\- |
---|
9. Numbers with maximum 2 decimals
10. Numbers with 1-5 decimals
11. Positive Integer, excluding 0
OR
OR
12. Negative Integer, excluding 0
OR
13. Positive Integer
OR
[1-9]\d* |
---|
14. Negative Integer
-[1-9]\d* |
---|
OR
15. Positive floating-point
[1-9]\d*\.\d* |
---|
OR
[1-9]\d*\.\d* | 0\.\d*[1-9]\d* | 0?\.0+ |
---|
16. Negative floating-point
OR
-([1-9]\d*\.\d* |
---|
OR
(-([1-9]\d*\.\d* | 0\.\d*[1-9]\d*)) | 0?\.0+ |
---|
OR
17. Floating-point
-?([1-9]\d*\.\d* | 0\.\d*[1-9]\d* | 0?\.0+ |
---|
regex/numbers.1663714011.txt.gz · Last modified: 2022/09/20 22:46 by peter