Regex > make compatible with PHP 7.3

Tests > Regex > fix "preg_match(): Compilation failed: invalid range in character class at offset 4" bug
This commit is contained in:
Meritoo
2019-04-02 15:46:02 +02:00
parent 87249aa30b
commit 8a94241eb8

View File

@@ -25,7 +25,7 @@ class Regex
* @var array * @var array
*/ */
private static $patterns = [ private static $patterns = [
'email' => '/^[\w-.]{2,}@[\w-]+\.[\w]{2,}+$/', 'email' => '/^[\w\-.]{2,}@[\w\-]+\.[\w]{2,}+$/',
'phone' => '/^\+?[0-9 ]+$/', 'phone' => '/^\+?[0-9 ]+$/',
'camelCasePart' => '/([a-z]|[A-Z]){1}[a-z]*/', 'camelCasePart' => '/([a-z]|[A-Z]){1}[a-z]*/',
'urlProtocol' => '/^([a-z]+:\/\/)', 'urlProtocol' => '/^([a-z]+:\/\/)',