From 7b7174c44bc56c7caa88adccfb60f2520d1089c1 Mon Sep 17 00:00:00 2001 From: Alexander Frolov Date: Tue, 21 Mar 2017 16:50:25 +0300 Subject: [PATCH] fix for #69 --- src/Phois/Whois/Whois.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Phois/Whois/Whois.php b/src/Phois/Whois/Whois.php index 739de3c..1142ad1 100644 --- a/src/Phois/Whois/Whois.php +++ b/src/Phois/Whois/Whois.php @@ -20,7 +20,7 @@ public function __construct($domain) $this->domain = $domain; // check $domain syntax and split full domain name on subdomain and TLDs if ( - preg_match('/^([\p{L}\d\-]+)\.((?:[\p{L}\-]+\.?)+)$/ui', $this->domain, $matches) + preg_match('/^([\p{L}\d\-]+)\.((?:[\p{L}\d\-]+\.?)+)$/ui', $this->domain, $matches) || preg_match('/^(xn\-\-[\p{L}\d\-]+)\.(xn\-\-(?:[a-z\d-]+\.?1?)+)$/ui', $this->domain, $matches) ) { $this->subDomain = $matches[1];