From 340d4b4e86dd10cb811a02eca93939e42678d34e Mon Sep 17 00:00:00 2001 From: Sahib Yar Date: Sat, 12 Aug 2017 13:51:47 +0500 Subject: [PATCH] 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. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1df58ac..05ae0ed 100644 --- a/README.md +++ b/README.md @@ -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,}$`