From 76a082ee5e38d3f1bfbc3bc176646fa427738955 Mon Sep 17 00:00:00 2001 From: Samuel Marchal Date: Tue, 25 Jul 2017 13:44:11 +0200 Subject: [PATCH] Minor fixes --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 94a3f1b..9d2c0c0 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ character can be repeated. For example the regular expression `[0-9]{2,3}` means characters in the range of 0 to 9).
-"[0-9]{2}" => The number was 9.9997 but we rounded it off to 10.0.
+"[0-9]{2,3}" => The number was 9.9997 but we rounded it off to 10.0.
 
We can leave out the second number. For example the regular expression `[0-9]{2,}` means: Match 2 or more digits. If we also remove @@ -407,15 +407,15 @@ line. And beacause of `m` flag now regular expression engine matches pattern at * *Positive Integers*: `^\d+$` * *Negative Integers*: `^-\d+$` -* *Phone Number*: `^+?[\d\s]{3,}$` -* *Phone with code*: `^+?[\d\s]+(?[\d\s]{10,}$` +* *US Phone Number*: `^+?[\d\s]{3,}$` +* *US Phone with code*: `^+?[\d\s]+(?[\d\s]{10,}$` * *Integers*: `^-?\d+$` * *Username*: `^[\w\d_.]{4,16}$` * *Alpha-numeric characters*: `^[a-zA-Z0-9]*$` * *Alpha-numeric characters with spaces*: `^[a-zA-Z0-9 ]*$` * *Password*: `^(?=^.{6,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$` * *email*: `^([a-zA-Z0-9._%-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4})*$` -* *IP address*: `^((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$` +* *IPv4 address*: `^((?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))*$` * *Lowercase letters only*: `^([a-z])*$` * *Uppercase letters only*: `^([A-Z])*$` * *URL*: `^(((http|https|ftp):\/\/)?([[a-zA-Z0-9]\-\.])+(\.)([[a-zA-Z0-9]]){2,4}([[a-zA-Z0-9]\/+=%&_\.~?\-]*))*$` @@ -433,4 +433,4 @@ line. And beacause of `m` flag now regular expression engine matches pattern at ## License -MIT © [Zeeshan Ahmed](mailto:ziishaned@gmail.com) \ No newline at end of file +MIT © [Zeeshan Ahmed](mailto:ziishaned@gmail.com)