From 8a94241eb802630a9cd80ff61891100bf8530fbf Mon Sep 17 00:00:00 2001 From: Meritoo Date: Tue, 2 Apr 2019 15:46:02 +0200 Subject: [PATCH] Regex > make compatible with PHP 7.3 Tests > Regex > fix "preg_match(): Compilation failed: invalid range in character class at offset 4" bug --- src/Utilities/Regex.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utilities/Regex.php b/src/Utilities/Regex.php index 3f8f78b..703c540 100644 --- a/src/Utilities/Regex.php +++ b/src/Utilities/Regex.php @@ -25,7 +25,7 @@ class Regex * @var array */ private static $patterns = [ - 'email' => '/^[\w-.]{2,}@[\w-]+\.[\w]{2,}+$/', + 'email' => '/^[\w\-.]{2,}@[\w\-]+\.[\w]{2,}+$/', 'phone' => '/^\+?[0-9 ]+$/', 'camelCasePart' => '/([a-z]|[A-Z]){1}[a-z]*/', 'urlProtocol' => '/^([a-z]+:\/\/)',