From d49d12e76e3ab4e55de2609ccbe7514b5d201d65 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Fri, 21 Sep 2012 05:38:36 +0200 Subject: [PATCH] Fix nameserver regex again to make sure all nameserver-like hostnames match --- pythonwhois/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonwhois/__init__.py b/pythonwhois/__init__.py index 5fcdbf4..55b12c0 100644 --- a/pythonwhois/__init__.py +++ b/pythonwhois/__init__.py @@ -41,7 +41,7 @@ grammar = { 'Record maintained by:\s?(?P.+)', 'Registration Service Provided By:\s?(?P.+)'], 'whois_server': ['Registrar Whois:\s?(?P.+)'], - 'name_servers': ['(?P[a-z]+d?ns[0-9]+\.([a-z0-9-]+\.)+[a-z0-9]+)', + 'name_servers': ['(?P[a-z]*d?ns[0-9]+\.([a-z0-9-]+\.)+[a-z0-9]+)', '(?P[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)', '(?P([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})'], 'emails': ['(?P[\w.-]+@[\w.-]+\.[\w]{2,4})']