mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 09:31:51 +01:00
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:
@@ -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]+:\/\/)',
|
||||||
|
|||||||
Reference in New Issue
Block a user