Resolved issue # 38

The positive integers are the numbers 1, 2, 3, 4, ... , sometimes called the natural numbers or counting numbers. Positive integers are denoted as Z+.
old regex was also allowing 0, which is not a positive number.
This commit is contained in:
Sahib Yar 2017-08-12 13:51:47 +05:00 committed by GitHub
parent 250d538b3c
commit 340d4b4e86

View File

@ -470,7 +470,7 @@ line. And because of `m` flag now regular expression engine matches pattern at t
## Bonus
* *Positive Integers*: `^\d+$`
* *Positive Integers*: `^[1-9]\d*$`
* *Negative Integers*: `^-\d+$`
* *US Phone Number*: `^+?[\d\s]{3,}$`
* *US Phone with code*: `^+?[\d\s]+(?[\d\s]{10,}$`