@ -151,6 +151,178 @@ grammar = {
}
}
def preprocess_regex ( regex ) :
# Fix for #2; prevents a ridiculous amount of varying size permutations.
regex = re . sub ( r " \\ s \ * \ ( \ ?P<([^>]+)> \ . \ + \ ) " , r " \ s*(?P< \ 1> \ S.*) " , regex )
# Experimental fix for #18; removes unnecessary variable-size whitespace
# matching, since we're stripping results anyway.
regex = re . sub ( r " \ [ \ ] \ * \ ( \ ?P<([^>]+)> \ . \ * \ ) " , r " (?P< \ 1>.*) " , regex )
return regex
registrant_regexes = [
" Registrant:[ ]* \n (?P<organization>.*) \n (?P<name>.*) \n (?P<street>.*) \n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*) \n (?P<country>.*) \n (?: Phone: (?P<phone>.*) \n )? Email: (?P<email>.*) \n " , # Corporate Domains, Inc.
" Registrant: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" (?:Registrant ID:(?P<handle>.+) \n )?Registrant Name:(?P<name>.*) \n (?:Registrant Organization:(?P<organization>.*) \n )?Registrant Street1?:(?P<street1>.*) \n (?:Registrant Street2:(?P<street2>.*) \n )?(?:Registrant Street3:(?P<street3>.*) \n )?Registrant City:(?P<city>.*) \n Registrant State/Province:(?P<state>.*) \n Registrant Postal Code:(?P<postalcode>.*) \n Registrant Country:(?P<country>.*) \n Registrant Phone:(?P<phone>.*) \n (?:Registrant Phone Ext.:(?P<phone_ext>.*) \n )?(?:Registrant FAX:(?P<fax>.*) \n )?(?:Registrant FAX Ext.:(?P<fax_ext>.*) \n )?Registrant Email:(?P<email>.*) " , # Public Interest Registry (.org), nic.pw, No-IP.com
" Registrant ID:(?P<handle>.+) \n Registrant Name:(?P<name>.*) \n (?:Registrant Organization:(?P<organization>.*) \n )?Registrant Address1?:(?P<street1>.*) \n (?:Registrant Address2:(?P<street2>.*) \n )?(?:Registrant Address3:(?P<street3>.*) \n )?Registrant City:(?P<city>.*) \n Registrant State/Province:(?P<state>.*) \n Registrant Country/Economy:(?P<country>.*) \n Registrant Postal Code:(?P<postalcode>.*) \n Registrant Phone:(?P<phone>.*) \n (?:Registrant Phone Ext.:(?P<phone_ext>.*) \n )?(?:Registrant FAX:(?P<fax>.*) \n )?(?:Registrant FAX Ext.:(?P<fax_ext>.*) \n )?Registrant E-mail:(?P<email>.*) " , # .ME, DotAsia
" Registrant ID: \ s*(?P<handle>.+) \n Registrant Name: \ s*(?P<name>.+) \n Registrant Organization: \ s*(?P<organization>.*) \n Registrant Address1: \ s*(?P<street1>.+) \n Registrant Address2: \ s*(?P<street2>.*) \n Registrant City: \ s*(?P<city>.+) \n Registrant State/Province: \ s*(?P<state>.+) \n Registrant Postal Code: \ s*(?P<postalcode>.+) \n Registrant Country: \ s*(?P<country>.+) \n Registrant Country Code: \ s*(?P<country_code>.+) \n Registrant Phone Number: \ s*(?P<phone>.+) \n Registrant Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Registrant Contact: (?P<handle>.+) \n Registrant Organization: (?P<organization>.+) \n Registrant Name: (?P<name>.+) \n Registrant Street: (?P<street>.+) \n Registrant City: (?P<city>.+) \n Registrant Postal Code: (?P<postalcode>.+) \n Registrant State: (?P<state>.+) \n Registrant Country: (?P<country>.+) \n Registrant Phone: (?P<phone>.*) \n Registrant Phone Ext: (?P<phone_ext>.*) \n Registrant Fax: (?P<fax>.*) \n Registrant Fax Ext: (?P<fax_ext>.*) \n Registrant Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Registrant ID:[ ]*(?P<handle>.*) \n )?Registrant Name:[ ]*(?P<name>.*) \n (?:Registrant Organization:[ ]*(?P<organization>.*) \n )?Registrant Street:[ ]*(?P<street1>.+) \n (?:Registrant Street:[ ]*(?P<street2>.+) \n )?(?:Registrant Street:[ ]*(?P<street3>.+) \n )?Registrant City:[ ]*(?P<city>.+) \n Registrant State(?: \ /Province)?:[ ]*(?P<state>.*) \n Registrant Postal Code:[ ]*(?P<postalcode>.+) \n Registrant Country:[ ]*(?P<country>.+) \n (?:Registrant Phone:[ ]*(?P<phone>.*) \n )?(?:Registrant Phone Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Registrant Fax:[ ]*(?P<fax>.*) \n )?(?:Registrant Fax Ext:[ ]*(?P<fax_ext>.*) \n )?(?:Registrant Email:[ ]*(?P<email>.+) \n )? " , # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum), EuroDNS, nic.ps
" Registrant \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n Email:(?P<email>.+) \n (?P<street1>.+) \n (?: (?P<street2>.+) \n )? (?P<postalcode>.+) (?P<city>.+) \n (?P<country>.+) \n Tel: (?P<phone>.+) \n \n " , # internet.bs
" Registrant Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" owner-id:[ ]*(?P<handle>.*) \n (?:owner-organization:[ ]*(?P<organization>.*) \n )?owner-name:[ ]*(?P<name>.*) \n owner-street:[ ]*(?P<street>.*) \n owner-city:[ ]*(?P<city>.*) \n owner-zip:[ ]*(?P<postalcode>.*) \n owner-country:[ ]*(?P<country>.*) \n (?:owner-phone:[ ]*(?P<phone>.*) \n )?(?:owner-fax:[ ]*(?P<fax>.*) \n )?owner-email:[ ]*(?P<email>.*) " , # InterNetworX
" Registrant: \n registrant_org: (?P<organization>.*) \n registrant_name: (?P<name>.*) \n registrant_email: (?P<email>.*) \n registrant_address: (?P<address>.*) \n registrant_city: (?P<city>.*) \n registrant_state: (?P<state>.*) \n registrant_zip: (?P<postalcode>.*) \n registrant_country: (?P<country>.*) \n registrant_phone: (?P<phone>.*) " , # Bellnames
" Holder of domain name: \n (?P<name>[ \ S \ s]+) \n (?P<street>.+) \n (?P<postalcode>[A-Z0-9-]+) \ s+(?P<city>.+) \n (?P<country>.+) \n Contractual Language " , # nic.ch
" \n \n (?:Owner)? \ s+: (?P<name>.*) \n (?: \ s+: (?P<organization>.*) \n )? \ s+: (?P<street>.*) \n \ s+: (?P<city>.*) \n \ s+: (?P<state>.*) \n \ s+: (?P<country>.*) \n " , # nic.io
" Contact Information: \n \ [Name \ ] \ s*(?P<name>.*) \n \ [Email \ ] \ s*(?P<email>.*) \n \ [Web Page \ ] \ s*(?P<url>.*) \n \ [Postal code \ ] \ s*(?P<postalcode>.*) \n \ [Postal Address \ ] \ s*(?P<street1>.*) \n (?: \ s+(?P<street2>.*) \n )?(?: \ s+(?P<street3>.*) \n )? \ [Phone \ ] \ s*(?P<phone>.*) \n \ [Fax \ ] \ s*(?P<fax>.*) \n " , # jprs.jp
" g \ . \ [Organization \ ] (?P<organization>.+) \n " , # .co.jp registrations at jprs.jp
" Registrant ID:(?P<handle>.*) \n Registrant Name:(?P<name>.*) \n (?:Registrant Organization:(?P<organization>.*) \n )?Registrant Address1:(?P<street1>.*) \n (?:Registrant Address2:(?P<street2>.*) \n )?(?:Registrant Address3:(?P<street3>.*) \n )?Registrant City:(?P<city>.*) \n (?:Registrant State/Province:(?P<state>.*) \n )?Registrant Postal Code:(?P<postalcode>.*) \n Registrant Country:(?P<country>.*) \n Registrant Country Code:.* \n Registrant Phone Number:(?P<phone>.*) \n (?:Registrant Facsimile Number:(?P<facsimile>.*) \n )?Registrant Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Registrant \n Name: (?P<name>.+) \n (?: Organization: (?P<organization>.+) \n )? ContactID: (?P<handle>.+) \n (?: Address: (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )?)? (?P<city>.+) \n (?P<postalcode>.+) \n (?P<state>.+) \n (?P<country>.+) \n )?(?: Created: (?P<creationdate>.+) \n )?(?: Last Update: (?P<changedate>.+) \n )? " , # nic.it
" Organisation Name[.]* (?P<name>.*) \n Organisation Address[.]* (?P<street1>.*) \n Organisation Address[.]* (?P<street2>.*) \n (?: Organisation Address[.]* (?P<street3>.*) \n )? Organisation Address[.]* (?P<city>.*) \n Organisation Address[.]* (?P<postalcode>.*) \n Organisation Address[.]* (?P<state>.*) \n Organisation Address[.]* (?P<country>.*) " , # Melbourne IT (what a horrid format...)
" Registrant:[ ]*(?P<name>.+) \n [ \ s \ S]*Eligibility Name:[ ]*(?P<organization>.+) \n [ \ s \ S]*Registrant Contact ID:[ ]*(?P<handle>.+) \n " , # .au business
" Eligibility Type:[ ]*Citizen \ /Resident \n [ \ s \ S]*Registrant Contact ID:[ ]*(?P<handle>.+) \n [ \ s \ S]*Registrant Contact Name:[ ]*(?P<name>.+) \n " , # .au individual
" Registrant:[ ]*(?P<organization>.+) \n [ \ s \ S]*Eligibility Type:[ ]*(Higher Education Institution|Company|Incorporated Association|Other) \n [ \ s \ S]*Registrant Contact ID:[ ]*(?P<handle>.+) \n [ \ s \ S]*Registrant Contact Name:[ ]*(?P<name>.+) \n " , # .au educational, company, 'incorporated association' (non-profit?), other (spotted for linux.conf.au, unsure if also for others)
" Registrant: \n (?P<name>.+) \n \n Registrant type: \n .* \n \n Registrant ' s address: \n The registrant .* opted to have " , # Nominet (.uk) with hidden address
" Registrant: \n (?P<name>.+) \n \n [ \ s \ S]* Registrant type: \n .* \n \n Registrant ' s address: \n (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )??)?? (?P<city>[^0-9 \n ]+) \n (?: (?P<state>.+) \n )? (?P<postalcode>.+) \n (?P<country>.+) \n \n " , # Nominet (.uk) with visible address
" Domain Owner: \n \t (?P<organization>.+) \n \n [ \ s \ S]*?(?:Registrant Contact: \n \t (?P<name>.+))? \n \n Registrant(?: ' s)? (?:a|A)ddress:(?: \n \t (?P<street1>.+) \n (?: \t (?P<street2>.+) \n )?(?: \t (?P<street3>.+) \n )? \t (?P<city>.+) \n \t (?P<postalcode>.+))? \n \t (?P<country>.+)(?: \n \t (?P<phone>.+) \ (Phone \ ) \n \t (?P<fax>.+) \ (FAX \ ) \n \t (?P<email>.+))? \n \n " , # .ac.uk - what a mess...
" Registrant ID: (?P<handle>.+) \n Registrant: (?P<name>.+) \n Registrant Contact Email: (?P<email>.+) " , # .cn (CNNIC)
" Registrant contact: \n (?P<name>.+) \n (?P<street>.*) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n \n " , # Fabulous.com
" registrant-name: \ s*(?P<name>.+) \n registrant-type: \ s*(?P<type>.+) \n registrant-address: \ s*(?P<street>.+) \n registrant-postcode: \ s*(?P<postalcode>.+) \n registrant-city: \ s*(?P<city>.+) \n registrant-country: \ s*(?P<country>.+) \n (?:registrant-phone: \ s*(?P<phone>.+) \n )?(?:registrant-email: \ s*(?P<email>.+) \n )? " , # Hetzner
" Registrant Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Contact Information : For Customer # [0-9]+[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication alternative (private WHOIS) format?
" Registrant: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
" Registrant: \n (?P<name>.+) \n (?P<street>.+) \n (?P<city>.+) (?P<state> \ S+),[ ]+(?P<postalcode>.+) \n (?P<country>.+) " , # .am
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>[^.,]+), (?P<district>.+), (?P<state>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 1
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 2
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+) \n (?:(?P<street2>.+) \n )?(?:(?P<street3>.+) \n )?.+?, (?P<district>.+) \n (?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 3
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)? \n (?P<city>.+),? (?P<state>[A-Z] { 2,3})(?: [A-Z0-9]+)? \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 4
" Registrant: \n (?P<organization>.+) \n (?P<name>.+) (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) \n (?P<street>.*) \n (?P<city>.+), (?P<state>[^, \n ]*) \n (?P<country>.+) \n " , # .com.tw (Western registrars)
" Registrant: \n (?P<organization1>.+) \n (?P<organization2>.+) \n (?P<street1>.+?)(?:,+(?P<street2>.+?)(?:,+(?P<street3>.+?)(?:,+(?P<street4>.+?)(?:,+(?P<street5>.+?)(?:,+(?P<street6>.+?)(?:,+(?P<street7>.+?))?)?)?)?)?)?,(?P<city>.+),(?P<country>.+) \n \n Contact: \n (?P<name>.+) (?P<email>.+) \n TEL: (?P<phone>.+?)(?:(?:#|ext.?)(?P<phone_ext>.+))? \n FAX: (?P<fax>.+)(?:(?:#|ext.?)(?P<fax_ext>.+))? \n " , # .com.tw (TWNIC/SEEDNET, Taiwanese companies only?)
" Registrant Contact Information: \n \n Company English Name \ (It should be the same as the registered/corporation name on your Business Register Certificate or relevant documents \ ):(?P<organization1>.+) \n Company Chinese name:(?P<organization2>.+) \n Address: (?P<street>.+) \n Country: (?P<country>.+) \n Email: (?P<email>.+) \n " , # HKDNR (.hk)
" owner: \ s+(?P<name>.+) " , # .br
" person: \ s+(?P<name>.+) " , # nic.ru (person)
" org: \ s+(?P<organization>.+) " , # nic.ru (organization)
]
tech_contact_regexes = [
" Technical Contact:[ ]* \n (?P<organization>.*) \n (?P<name>.*) \n (?P<street>.*) \n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*) \n (?P<country>.*) \n (?: Phone: (?P<phone>.*) \n )? Email: (?P<email>.*) \n " , # Corporate Domains, Inc.
" Technical Contact: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" (?:Tech ID:(?P<handle>.+) \n )?Tech Name:(?P<name>.*) \n (:?Tech Organization:(?P<organization>.*) \n )?Tech Street1?:(?P<street1>.*) \n (?:Tech Street2:(?P<street2>.*) \n )?(?:Tech Street3:(?P<street3>.*) \n )?Tech City:(?P<city>.*) \n Tech State/Province:(?P<state>.*) \n Tech Postal Code:(?P<postalcode>.*) \n Tech Country:(?P<country>.*) \n Tech Phone:(?P<phone>.*) \n (?:Tech Phone Ext.:(?P<phone_ext>.*) \n )?(?:Tech FAX:(?P<fax>.*) \n )?(?:Tech FAX Ext.:(?P<fax_ext>.*) \n )?Tech Email:(?P<email>.*) " , # Public Interest Registry (.org), nic.pw, No-IP.com
" Tech(?:nical)? ID:(?P<handle>.+) \n Tech(?:nical)? Name:(?P<name>.*) \n (?:Tech(?:nical)? Organization:(?P<organization>.*) \n )?Tech(?:nical)? Address1?:(?P<street1>.*) \n (?:Tech(?:nical)? Address2:(?P<street2>.*) \n )?(?:Tech(?:nical)? Address3:(?P<street3>.*) \n )?Tech(?:nical)? City:(?P<city>.*) \n Tech(?:nical)? State/Province:(?P<state>.*) \n Tech(?:nical)? Country/Economy:(?P<country>.*) \n Tech(?:nical)? Postal Code:(?P<postalcode>.*) \n Tech(?:nical)? Phone:(?P<phone>.*) \n (?:Tech(?:nical)? Phone Ext.:(?P<phone_ext>.*) \n )?(?:Tech(?:nical)? FAX:(?P<fax>.*) \n )?(?:Tech(?:nical)? FAX Ext.:(?P<fax_ext>.*) \n )?Tech(?:nical)? E-mail:(?P<email>.*) " , # .ME, DotAsia
" Technical Contact ID: \ s*(?P<handle>.+) \n Technical Contact Name: \ s*(?P<name>.+) \n Technical Contact Organization: \ s*(?P<organization>.*) \n Technical Contact Address1: \ s*(?P<street1>.+) \n Technical Contact Address2: \ s*(?P<street2>.*) \n Technical Contact City: \ s*(?P<city>.+) \n Technical Contact State/Province: \ s*(?P<state>.+) \n Technical Contact Postal Code: \ s*(?P<postalcode>.+) \n Technical Contact Country: \ s*(?P<country>.+) \n Technical Contact Country Code: \ s*(?P<country_code>.+) \n Technical Contact Phone Number: \ s*(?P<phone>.+) \n Technical Contact Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Tech Contact: (?P<handle>.+) \n Tech Organization: (?P<organization>.+) \n Tech Name: (?P<name>.+) \n Tech Street: (?P<street>.+) \n Tech City: (?P<city>.+) \n Tech Postal Code: (?P<postalcode>.+) \n Tech State: (?P<state>.+) \n Tech Country: (?P<country>.+) \n Tech Phone: (?P<phone>.*) \n Tech Phone Ext: (?P<phone_ext>.*) \n Tech Fax: (?P<fax>.*) \n Tech Fax Ext: (?P<fax_ext>.*) \n Tech Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Tech ID:[ ]*(?P<handle>.*) \n )?Tech[ ]*Name:[ ]*(?P<name>.*) \n (?:Tech[ ]*Organization:[ ]*(?P<organization>.*) \n )?Tech[ ]*Street:[ ]*(?P<street1>.+) \n (?:Tech[ ]*Street:[ ]*(?P<street2>.+) \n )?(?:Tech[ ]*Street:[ ]*(?P<street3>.+) \n )?Tech[ ]*City:[ ]*(?P<city>.+) \n Tech[ ]*State(?: \ /Province)?:[ ]*(?P<state>.*) \n Tech[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+) \n Tech[ ]*Country:[ ]*(?P<country>.+) \n (?:Tech[ ]*Phone:[ ]*(?P<phone>.*) \n )?(?:Tech[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Tech[ ]*Fax:[ ]*(?P<fax>.*) \n )?(?:Tech[ ]*Fax[ ]*Ext: \ s*?(?P<fax_ext>.*) \n )?(?:Tech[ ]*Email:[ ]*(?P<email>.+) \n )? " , # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum), EuroDNS, nic.ps
" Technical Contact \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n Email:(?P<email>.+) \n (?P<street1>.+) \n (?: (?P<street2>.+) \n )? (?P<postalcode>.+) (?P<city>.+) \n (?P<country>.+) \n Tel: (?P<phone>.+) \n \n " , # internet.bs
" Technical Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" tech-id:[ ]*(?P<handle>.*) \n (?:tech-organization:[ ]*(?P<organization>.*) \n )?tech-name:[ ]*(?P<name>.*) \n tech-street:[ ]*(?P<street>.*) \n tech-city:[ ]*(?P<city>.*) \n tech-zip:[ ]*(?P<postalcode>.*) \n tech-country:[ ]*(?P<country>.*) \n (?:tech-phone:[ ]*(?P<phone>.*) \n )?(?:tech-fax:[ ]*(?P<fax>.*) \n )?tech-email:[ ]*(?P<email>.*) " , # InterNetworX
" Technical Contact: \n tech_org: (?P<organization>.*) \n tech_name: (?P<name>.*) \n tech_email: (?P<email>.*) \n tech_address: (?P<address>.*) \n tech_city: (?P<city>.*) \n tech_state: (?P<state>.*) \n tech_zip: (?P<postalcode>.*) \n tech_country: (?P<country>.*) \n tech_phone: (?P<phone>.*) " , # Bellnames
" Technical contact: \n (?P<name>[ \ S \ s]+) \n (?P<street>.+) \n (?P<postalcode>[A-Z0-9-]+) \ s+(?P<city>.+) \n (?P<country>.+) \n \n " , # nic.ch
" Tech Contact ID:[ ]*(?P<handle>.+) \n Tech Contact Name:[ ]*(?P<name>.+) " , # .au
" Technical Contact ID:(?P<handle>.*) \n Technical Contact Name:(?P<name>.*) \n (?:Technical Contact Organization:(?P<organization>.*) \n )?Technical Contact Address1:(?P<street1>.*) \n (?:Technical Contact Address2:(?P<street2>.*) \n )?(?:Technical Contact Address3:(?P<street3>.*) \n )?Technical Contact City:(?P<city>.*) \n (?:Technical Contact State/Province:(?P<state>.*) \n )?Technical Contact Postal Code:(?P<postalcode>.*) \n Technical Contact Country:(?P<country>.*) \n Technical Contact Country Code:.* \n Technical Contact Phone Number:(?P<phone>.*) \n (?:Technical Contact Facsimile Number:(?P<facsimile>.*) \n )?Technical Contact Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Technical Contacts \n Name: (?P<name>.+) \n (?: Organization: (?P<organization>.+) \n )? ContactID: (?P<handle>.+) \n (?: Address: (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )?)? (?P<city>.+) \n (?P<postalcode>.+) \n (?P<state>.+) \n (?P<country>.+) \n )?(?: Created: (?P<creationdate>.+) \n )?(?: Last Update: (?P<changedate>.+) \n )? " , # nic.it // NOTE: Why does this say 'Contacts'? Can it have multiple?
" Tech Name[.]* (?P<name>.*) \n Tech Address[.]* (?P<street1>.*) \n Tech Address[.]* (?P<street2>.*) \n (?: Tech Address[.]* (?P<street3>.*) \n )? Tech Address[.]* (?P<city>.*) \n Tech Address[.]* (?P<postalcode>.*) \n Tech Address[.]* (?P<state>.*) \n Tech Address[.]* (?P<country>.*) \n Tech Email[.]* (?P<email>.*) \n Tech Phone[.]* (?P<phone>.*) \n Tech Fax[.]* (?P<fax>.*) " , # Melbourne IT
" Technical contact: \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n (?P<email>.+) \n (?P<street>.+) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n " , # Fabulous.com
" tech-c-name: \ s*(?P<name>.+) \n tech-c-type: \ s*(?P<type>.+) \n tech-c-address: \ s*(?P<street>.+) \n tech-c-postcode: \ s*(?P<postalcode>.+) \n tech-c-city: \ s*(?P<city>.+) \n tech-c-country: \ s*(?P<country>.+) \n (?:tech-c-phone: \ s*(?P<phone>.+) \n )?(?:tech-c-email: \ s*(?P<email>.+) \n )? " , # Hetzner
" Admin Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Technical contact: \n (?P<name>.+) \n (?P<organization>.*) \n (?P<street>.+) \n (?P<city>.+) (?P<state> \ S+),[ ]+(?P<postalcode>.+) \n (?P<country>.+) \n (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) " , # .am
" Technical: \n \ s*Name: \ s*(?P<name>.*) \n \ s*Organisation: \ s*(?P<organization>.*) \n \ s*Language:.* \n \ s*Phone: \ s*(?P<phone>.*) \n \ s*Fax: \ s*(?P<fax>.*) \n \ s*Email: \ s*(?P<email>.*) \n " , # EURid
" \ [Zone-C \ ] \n Type: (?P<type>.+) \n Name: (?P<name>.+) \n (Organisation: (?P<organization>.+) \n ) { 0,1}(Address: (?P<street1>.+) \n ) {1} (Address: (?P<street2>.+) \n ) { 0,1}(Address: (?P<street3>.+) \n ) { 0,1}(Address: (?P<street4>.+) \n ) { 0,1}PostalCode: (?P<postalcode>.+) \n City: (?P<city>.+) \n CountryCode: (?P<country>[A-Za-z] {2} ) \n Phone: (?P<phone>.+) \n Fax: (?P<fax>.+) \n Email: (?P<email>.+) \n (Remarks: (?P<remark>.+) \n ) { 0,1}Changed: (?P<changed>.+) " , # DeNIC
" Technical Contact: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)? \n (?P<city>.+),? (?P<state>[A-Z] { 2,3})(?: [A-Z0-9]+)? \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 1
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)? \n (?P<city>.+), (?P<state>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 2
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 3
" Tech Contact: (?P<handle>.+) \n (?P<street1>.+) (?P<city>[^ \ s]+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 4
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+) \n (?P<district>.+) (?P<city>[^ \ s]+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 5
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+) \n (?P<street2>.+) \n (?:(?P<street3>.+) \n )?(?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 6
" Technical Contact: \n (?P<name>.+) (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) \n " , # .com.tw (Western registrars)
" Technical Contact Information: \n \n (?:Given name: (?P<firstname>.+) \n )?(?:Family name: (?P<lastname>.+) \n )?(?:Company name: (?P<organization>.+) \n )?Address: (?P<street>.+) \n Country: (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n Email: (?P<email>.+) \n (?:Account Name: (?P<handle>.+) \n )? " , # HKDNR (.hk)
]
admin_contact_regexes = [
" Administrative Contact:[ ]* \n (?P<organization>.*) \n (?P<name>.*) \n (?P<street>.*) \n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*) \n (?P<country>.*) \n (?: Phone: (?P<phone>.*) \n )? Email: (?P<email>.*) \n " , # Corporate Domains, Inc.
" Administrative Contact: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" (?:Admin ID:(?P<handle>.+) \n )?Admin Name:(?P<name>.*) \n (?:Admin Organization:(?P<organization>.*) \n )?Admin Street1?:(?P<street1>.*) \n (?:Admin Street2:(?P<street2>.*) \n )?(?:Admin Street3:(?P<street3>.*) \n )?Admin City:(?P<city>.*) \n Admin State/Province:(?P<state>.*) \n Admin Postal Code:(?P<postalcode>.*) \n Admin Country:(?P<country>.*) \n Admin Phone:(?P<phone>.*) \n (?:Admin Phone Ext.:(?P<phone_ext>.*) \n )?(?:Admin FAX:(?P<fax>.*) \n )?(?:Admin FAX Ext.:(?P<fax_ext>.*) \n )?Admin Email:(?P<email>.*) " , # Public Interest Registry (.org), nic.pw, No-IP.com
" Admin(?:istrative)? ID:(?P<handle>.+) \n Admin(?:istrative)? Name:(?P<name>.*) \n (?:Admin(?:istrative)? Organization:(?P<organization>.*) \n )?Admin(?:istrative)? Address1?:(?P<street1>.*) \n (?:Admin(?:istrative)? Address2:(?P<street2>.*) \n )?(?:Admin(?:istrative)? Address3:(?P<street3>.*) \n )?Admin(?:istrative)? City:(?P<city>.*) \n Admin(?:istrative)? State/Province:(?P<state>.*) \n Admin(?:istrative)? Country/Economy:(?P<country>.*) \n Admin(?:istrative)? Postal Code:(?P<postalcode>.*) \n Admin(?:istrative)? Phone:(?P<phone>.*) \n (?:Admin(?:istrative)? Phone Ext.:(?P<phone_ext>.*) \n )?(?:Admin(?:istrative)? FAX:(?P<fax>.*) \n )?(?:Admin(?:istrative)? FAX Ext.:(?P<fax_ext>.*) \n )?Admin(?:istrative)? E-mail:(?P<email>.*) " , # .ME, DotAsia
" Administrative Contact ID: \ s*(?P<handle>.+) \n Administrative Contact Name: \ s*(?P<name>.+) \n Administrative Contact Organization: \ s*(?P<organization>.*) \n Administrative Contact Address1: \ s*(?P<street1>.+) \n Administrative Contact Address2: \ s*(?P<street2>.*) \n Administrative Contact City: \ s*(?P<city>.+) \n Administrative Contact State/Province: \ s*(?P<state>.+) \n Administrative Contact Postal Code: \ s*(?P<postalcode>.+) \n Administrative Contact Country: \ s*(?P<country>.+) \n Administrative Contact Country Code: \ s*(?P<country_code>.+) \n Administrative Contact Phone Number: \ s*(?P<phone>.+) \n Administrative Contact Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Admin Contact: (?P<handle>.+) \n Admin Organization: (?P<organization>.+) \n Admin Name: (?P<name>.+) \n Admin Street: (?P<street>.+) \n Admin City: (?P<city>.+) \n Admin State: (?P<state>.+) \n Admin Postal Code: (?P<postalcode>.+) \n Admin Country: (?P<country>.+) \n Admin Phone: (?P<phone>.*) \n Admin Phone Ext: (?P<phone_ext>.*) \n Admin Fax: (?P<fax>.*) \n Admin Fax Ext: (?P<fax_ext>.*) \n Admin Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Admin ID:[ ]*(?P<handle>.*) \n )?Admin[ ]*Name:[ ]*(?P<name>.*) \n (?:Admin[ ]*Organization:[ ]*(?P<organization>.*) \n )?Admin[ ]*Street:[ ]*(?P<street1>.+) \n (?:Admin[ ]*Street:[ ]*(?P<street2>.+) \n )?(?:Admin[ ]*Street:[ ]*(?P<street3>.+) \n )?Admin[ ]*City:[ ]*(?P<city>.+) \n Admin[ ]*State(?: \ /Province)?:[ ]*(?P<state>.*) \n Admin[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+) \n Admin[ ]*Country:[ ]*(?P<country>.+) \n (?:Admin[ ]*Phone:[ ]*(?P<phone>.*) \n )?(?:Admin[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Admin[ ]*Fax:[ ]*(?P<fax>.*) \n )?(?:Admin[ ]*Fax[ ]*Ext: \ s*?(?P<fax_ext>.*) \n )?(?:Admin[ ]*Email:[ ]*(?P<email>.+) \n )? " , # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum), EuroDNS, nic.ps
" Administrative Contact \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n Email:(?P<email>.+) \n (?P<street1>.+) \n (?: (?P<street2>.+) \n )? (?P<postalcode>.+) (?P<city>.+) \n (?P<country>.+) \n Tel: (?P<phone>.+) \n \n " , # internet.bs
" Administrative Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" admin-id:[ ]*(?P<handle>.*) \n (?:admin-organization:[ ]*(?P<organization>.*) \n )?admin-name:[ ]*(?P<name>.*) \n admin-street:[ ]*(?P<street>.*) \n admin-city:[ ]*(?P<city>.*) \n admin-zip:[ ]*(?P<postalcode>.*) \n admin-country:[ ]*(?P<country>.*) \n (?:admin-phone:[ ]*(?P<phone>.*) \n )?(?:admin-fax:[ ]*(?P<fax>.*) \n )?admin-email:[ ]*(?P<email>.*) " , # InterNetworX
" Administrative Contact: \n admin_org: (?P<organization>.*) \n admin_name: (?P<name>.*) \n admin_email: (?P<email>.*) \n admin_address: (?P<address>.*) \n admin_city: (?P<city>.*) \n admin_state: (?P<state>.*) \n admin_zip: (?P<postalcode>.*) \n admin_country: (?P<country>.*) \n admin_phone: (?P<phone>.*) " , # Bellnames
" Administrative Contact ID:(?P<handle>.*) \n Administrative Contact Name:(?P<name>.*) \n (?:Administrative Contact Organization:(?P<organization>.*) \n )?Administrative Contact Address1:(?P<street1>.*) \n (?:Administrative Contact Address2:(?P<street2>.*) \n )?(?:Administrative Contact Address3:(?P<street3>.*) \n )?Administrative Contact City:(?P<city>.*) \n (?:Administrative Contact State/Province:(?P<state>.*) \n )?Administrative Contact Postal Code:(?P<postalcode>.*) \n Administrative Contact Country:(?P<country>.*) \n Administrative Contact Country Code:.* \n Administrative Contact Phone Number:(?P<phone>.*) \n (?:Administrative Contact Facsimile Number:(?P<facsimile>.*) \n )?Administrative Contact Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Admin Contact \n Name: (?P<name>.+) \n (?: Organization: (?P<organization>.+) \n )? ContactID: (?P<handle>.+) \n (?: Address: (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )?)? (?P<city>.+) \n (?P<postalcode>.+) \n (?P<state>.+) \n (?P<country>.+) \n )?(?: Created: (?P<creationdate>.+) \n )?(?: Last Update: (?P<changedate>.+) \n )? " , # nic.it
" Admin Name[.]* (?P<name>.*) \n Admin Address[.]* (?P<street1>.*) \n Admin Address[.]* (?P<street2>.*) \n (?: Admin Address[.]* (?P<street3>.*) \n )? Admin Address[.]* (?P<city>.*) \n Admin Address[.]* (?P<postalcode>.*) \n Admin Address[.]* (?P<state>.*) \n Admin Address[.]* (?P<country>.*) \n Admin Email[.]* (?P<email>.*) \n Admin Phone[.]* (?P<phone>.*) \n Admin Fax[.]* (?P<fax>.*) " , # Melbourne IT
" Administrative contact: \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n (?P<email>.+) \n (?P<street>.+) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n " , # Fabulous.com
" admin-c-name: \ s*(?P<name>.+) \n admin-c-type: \ s*(?P<type>.+) \n admin-c-address: \ s*(?P<street>.+) \n admin-c-postcode: \ s*(?P<postalcode>.+) \n admin-c-city: \ s*(?P<city>.+) \n admin-c-country: \ s*(?P<country>.+) \n (?:admin-c-phone: \ s*(?P<phone>.+) \n )?(?:admin-c-email: \ s*(?P<email>.+) \n )? " , # Hetzner
" Tech Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Administrative contact: \n (?P<name>.+) \n (?P<organization>.*) \n (?P<street>.+) \n (?P<city>.+) (?P<state> \ S+),[ ]+(?P<postalcode>.+) \n (?P<country>.+) \n (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) " , # .am
" Administrative Contact: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
" \ [Tech-C \ ] \n Type: (?P<type>.+) \n Name: (?P<name>.+) \n (Organisation: (?P<organization>.+) \n ) { 0,1}(Address: (?P<street1>.+) \n ) {1} (Address: (?P<street2>.+) \n ) { 0,1}(Address: (?P<street3>.+) \n ) { 0,1}(Address: (?P<street4>.+) \n ) { 0,1}PostalCode: (?P<postalcode>.+) \n City: (?P<city>.+) \n CountryCode: (?P<country>[A-Za-z] {2} ) \n Phone: (?P<phone>.+) \n Fax: (?P<fax>.+) \n Email: (?P<email>.+) \n (Remarks: (?P<remark>.+) \n ) { 0,1}Changed: (?P<changed>.+) " , # DeNIC
" Administrative Contact: \n (?P<name>.+) (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) \n " , # .com.tw (Western registrars)
" Administrative Contact Information: \n \n (?:Given name: (?P<firstname>.+) \n )?(?:Family name: (?P<lastname>.+) \n )?(?:Company name: (?P<organization>.+) \n )?Address: (?P<street>.+) \n Country: (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n Email: (?P<email>.+) \n (?:Account Name: (?P<handle>.+) \n )? " , # HKDNR (.hk)
]
billing_contact_regexes = [
" (?:Billing ID:(?P<handle>.+) \n )?Billing Name:(?P<name>.*) \n Billing Organization:(?P<organization>.*) \n Billing Street1:(?P<street1>.*) \n (?:Billing Street2:(?P<street2>.*) \n )?(?:Billing Street3:(?P<street3>.*) \n )?Billing City:(?P<city>.*) \n Billing State/Province:(?P<state>.*) \n Billing Postal Code:(?P<postalcode>.*) \n Billing Country:(?P<country>.*) \n Billing Phone:(?P<phone>.*) \n (?:Billing Phone Ext.:(?P<phone_ext>.*) \n )?(?:Billing FAX:(?P<fax>.*) \n )?(?:Billing FAX Ext.:(?P<fax_ext>.*) \n )?Billing Email:(?P<email>.*) " , # nic.pw, No-IP.com
" Billing ID:(?P<handle>.+) \n Billing Name:(?P<name>.*) \n (?:Billing Organization:(?P<organization>.*) \n )?Billing Address1?:(?P<street1>.*) \n (?:Billing Address2:(?P<street2>.*) \n )?(?:Billing Address3:(?P<street3>.*) \n )?Billing City:(?P<city>.*) \n Billing State/Province:(?P<state>.*) \n Billing Country/Economy:(?P<country>.*) \n Billing Postal Code:(?P<postalcode>.*) \n Billing Phone:(?P<phone>.*) \n (?:Billing Phone Ext.:(?P<phone_ext>.*) \n )?(?:Billing FAX:(?P<fax>.*) \n )?(?:Billing FAX Ext.:(?P<fax_ext>.*) \n )?Billing E-mail:(?P<email>.*) " , # DotAsia
" Billing Contact ID: \ s*(?P<handle>.+) \n Billing Contact Name: \ s*(?P<name>.+) \n Billing Contact Organization: \ s*(?P<organization>.*) \n Billing Contact Address1: \ s*(?P<street1>.+) \n Billing Contact Address2: \ s*(?P<street2>.*) \n Billing Contact City: \ s*(?P<city>.+) \n Billing Contact State/Province: \ s*(?P<state>.+) \n Billing Contact Postal Code: \ s*(?P<postalcode>.+) \n Billing Contact Country: \ s*(?P<country>.+) \n Billing Contact Country Code: \ s*(?P<country_code>.+) \n Billing Contact Phone Number: \ s*(?P<phone>.+) \n Billing Contact Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Billing Contact: (?P<handle>.+) \n Billing Organization: (?P<organization>.+) \n Billing Name: (?P<name>.+) \n Billing Street: (?P<street>.+) \n Billing City: (?P<city>.+) \n Billing Postal Code: (?P<postalcode>.+) \n Billing State: (?P<state>.+) \n Billing Country: (?P<country>.+) \n Billing Phone: (?P<phone>.*) \n Billing Phone Ext: (?P<phone_ext>.*) \n Billing Fax: (?P<fax>.*) \n Billing Fax Ext: (?P<fax_ext>.*) \n Billing Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Billing ID:[ ]*(?P<handle>.*) \n )?Billing[ ]*Name:[ ]*(?P<name>.*) \n (?:Billing[ ]*Organization:[ ]*(?P<organization>.*) \n )?Billing[ ]*Street:[ ]*(?P<street1>.+) \n (?:Billing[ ]*Street:[ ]*(?P<street2>.+) \n )?Billing[ ]*City:[ ]*(?P<city>.+) \n Billing[ ]*State \ /Province:[ ]*(?P<state>.+) \n Billing[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+) \n Billing[ ]*Country:[ ]*(?P<country>.+) \n (?:Billing[ ]*Phone:[ ]*(?P<phone>.*) \n )?(?:Billing[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Billing[ ]*Fax:[ ]*(?P<fax>.*) \n )?(?:Billing[ ]*Fax[ ]*Ext: \ s*?(?P<fax_ext>.*) \n )?(?:Billing[ ]*Email:[ ]*(?P<email>.+) \n )? " , # Musedoma (.museum)
" Billing Contact: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" Billing Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" billing-id:[ ]*(?P<handle>.*) \n (?:billing-organization:[ ]*(?P<organization>.*) \n )?billing-name:[ ]*(?P<name>.*) \n billing-street:[ ]*(?P<street>.*) \n billing-city:[ ]*(?P<city>.*) \n billing-zip:[ ]*(?P<postalcode>.*) \n billing-country:[ ]*(?P<country>.*) \n (?:billing-phone:[ ]*(?P<phone>.*) \n )?(?:billing-fax:[ ]*(?P<fax>.*) \n )?billing-email:[ ]*(?P<email>.*) " , # InterNetworX
" Billing Contact: \n bill_org: (?P<organization>.*) \n bill_name: (?P<name>.*) \n bill_email: (?P<email>.*) \n bill_address: (?P<address>.*) \n bill_city: (?P<city>.*) \n bill_state: (?P<state>.*) \n bill_zip: (?P<postalcode>.*) \n bill_country: (?P<country>.*) \n bill_phone: (?P<phone>.*) " , # Bellnames
" Billing Contact ID:(?P<handle>.*) \n Billing Contact Name:(?P<name>.*) \n (?:Billing Contact Organization:(?P<organization>.*) \n )?Billing Contact Address1:(?P<street1>.*) \n (?:Billing Contact Address2:(?P<street2>.*) \n )?(?:Billing Contact Address3:(?P<street3>.*) \n )?Billing Contact City:(?P<city>.*) \n (?:Billing Contact State/Province:(?P<state>.*) \n )?Billing Contact Postal Code:(?P<postalcode>.*) \n Billing Contact Country:(?P<country>.*) \n Billing Contact Country Code:.* \n Billing Contact Phone Number:(?P<phone>.*) \n (?:Billing Contact Facsimile Number:(?P<facsimile>.*) \n )?Billing Contact Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Billing contact: \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n (?P<email>.+) \n (?P<street>.+) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n " , # Fabulous.com
" Billing Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Billing Contact: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
]
# Some registries use NIC handle references instead of directly listing contacts...
nic_contact_references = {
" registrant " : [
" registrant: \ s*(?P<handle>.+) " , # nic.at
" owner-contact: \ s*(?P<handle>.+) " , # LCN.com
" holder-c: \ s*(?P<handle>.+) " , # AFNIC
" holder: \ s*(?P<handle>.+) " , # iis.se (they apparently want to be difficult, and won't give you contact info for the handle over their WHOIS service)
] ,
" tech " : [
" tech-c: \ s*(?P<handle>.+) " , # nic.at, AFNIC, iis.se
" technical-contact: \ s*(?P<handle>.+) " , # LCN.com
" n \ . \ [Technical Contact \ ] (?P<handle>.+) \n " , #.co.jp
] ,
" admin " : [
" admin-c: \ s*(?P<handle>.+) " , # nic.at, AFNIC, iis.se
" admin-contact: \ s*(?P<handle>.+) " , # LCN.com
" m \ . \ [Administrative Contact \ ] (?P<handle>.+) \n " , # .co.jp
] ,
" billing " : [
" billing-c: \ s*(?P<handle>.+) " , # iis.se
" billing-contact: \ s*(?P<handle>.+) " , # LCN.com
]
}
# Why do the below? The below is meant to handle with an edge case (issue #2) where a partial match followed
# by a failure, for a regex containing the \s*.+ pattern, would send the regex module on a wild goose hunt for
# matching positions. The workaround is to use \S.* instead of .+, but in the interest of keeping the regexes
# consistent and compact, it's more practical to do this (predictable) conversion on runtime.
# FIXME: This breaks on NIC contact regex for nic.at. Why?
registrant_regexes = [ preprocess_regex ( regex ) for regex in registrant_regexes ]
tech_contact_regexes = [ preprocess_regex ( regex ) for regex in tech_contact_regexes ]
admin_contact_regexes = [ preprocess_regex ( regex ) for regex in admin_contact_regexes ]
billing_contact_regexes = [ preprocess_regex ( regex ) for regex in billing_contact_regexes ]
nic_contact_regexes = [
" personname: \ s*(?P<name>.+) \n organization: \ s*(?P<organization>.+) \n street address: \ s*(?P<street>.+) \n postal code: \ s*(?P<postalcode>.+) \n city: \ s*(?P<city>.+) \n country: \ s*(?P<country>.+) \n (?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:e-mail: \ s*(?P<email>.+) \n )?nic-hdl: \ s*(?P<handle>.+) \n changed: \ s*(?P<changedate>.+) " , # nic.at
" contact-handle:[ ]*(?P<handle>.+) \n contact:[ ]*(?P<name>.+) \n (?:organisation:[ ]*(?P<organization>.+) \n )?address:[ ]*(?P<street1>.+) \n (?:address:[ ]*(?P<street2>.+) \n )?(?:address:[ ]*(?P<street3>.+) \n )?(?:address:[ ]*(?P<street4>.+) \n )?address:[ ]*(?P<city>.+) \n address:[ ]*(?P<state>.+) \n address:[ ]*(?P<postalcode>.+) \n address:[ ]*(?P<country>.+) \n (?:phone:[ ]*(?P<phone>.+) \n )?(?:fax:[ ]*(?P<fax>.+) \n )?(?:email:[ ]*(?P<email>.+) \n )? " , # LCN.com
" Contact Information: \n a \ . \ [JPNIC Handle \ ] (?P<handle>.+) \n c \ . \ [Last, First \ ] (?P<lastname>.+), (?P<firstname>.+) \n d \ . \ [E-Mail \ ] (?P<email>.+) \n g \ . \ [Organization \ ] (?P<organization>.+) \n l \ . \ [Division \ ] (?P<division>.+) \n n \ . \ [Title \ ] (?P<title>.+) \n o \ . \ [TEL \ ] (?P<phone>.+) \n p \ . \ [FAX \ ] (?P<fax>.+) \n y \ . \ [Reply Mail \ ] .* \n \ [Last Update \ ] (?P<changedate>.+) \ (JST \ ) \n " , # JPRS .co.jp contact handle lookup
" person: \ s*(?P<name>.+) \n nic-hdl: \ s*(?P<handle>.+) \n " , # .ie
" nic-hdl: \ s+(?P<handle>.+) \n person: \ s+(?P<name>.+) \n (?:e-mail: \ s+(?P<email>.+) \n )?(?:address: \ s+(?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+), (?P<state>.+), (?P<country>.+) \n )?(?:phone: \ s+(?P<phone>.+) \n )?(?:fax-no: \ s+(?P<fax>.+) \n )? " , # nic.ir, individual - this is a nasty one.
" nic-hdl: \ s+(?P<handle>.+) \n org: \ s+(?P<organization>.+) \n (?:e-mail: \ s+(?P<email>.+) \n )?(?:address: \ s+(?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+), (?P<state>.+), (?P<country>.+) \n )?(?:phone: \ s+(?P<phone>.+) \n )?(?:fax-no: \ s+(?P<fax>.+) \n )? " , # nic.ir, organization
" nic-hdl: \ s*(?P<handle>.+) \n type: \ s*(?P<type>.+) \n contact: \ s*(?P<name>.+) \n (?:.+ \n )*?(?:address: \ s*(?P<street1>.+) \n address: \ s*(?P<street2>.+) \n address: \ s*(?P<street3>.+) \n address: \ s*(?P<country>.+) \n )?(?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:.+ \n )*?(?:e-mail: \ s*(?P<email>.+) \n )?(?:.+ \n )*?changed: \ s*(?P<changedate>[0-9] {2} \ /[0-9] {2} \ /[0-9] {4} ).* \n " , # AFNIC madness without country field
" nic-hdl: \ s*(?P<handle>.+) \n type: \ s*(?P<type>.+) \n contact: \ s*(?P<name>.+) \n (?:.+ \n )*?(?:address: \ s*(?P<street1>.+) \n )?(?:address: \ s*(?P<street2>.+) \n )?(?:address: \ s*(?P<street3>.+) \n )?(?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:.+ \n )*?(?:e-mail: \ s*(?P<email>.+) \n )?(?:.+ \n )*?changed: \ s*(?P<changedate>[0-9] {2} \ /[0-9] {2} \ /[0-9] {4} ).* \n " , # AFNIC madness any country -at all-
" nic-hdl: \ s*(?P<handle>.+) \n type: \ s*(?P<type>.+) \n contact: \ s*(?P<name>.+) \n (?:.+ \n )*?(?:address: \ s*(?P<street1>.+) \n )?(?:address: \ s*(?P<street2>.+) \n )?(?:address: \ s*(?P<street3>.+) \n )?(?:address: \ s*(?P<street4>.+) \n )?country: \ s*(?P<country>.+) \n (?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:.+ \n )*?(?:e-mail: \ s*(?P<email>.+) \n )?(?:.+ \n )*?changed: \ s*(?P<changedate>[0-9] {2} \ /[0-9] {2} \ /[0-9] {4} ).* \n " , # AFNIC madness with country field
]
if sys . version_info < ( 3 , 0 ) :
def is_string ( data ) :
@ -531,173 +703,12 @@ def remove_suffixes(data):
return cleaned_list
def preprocess_regex ( regex ) :
# Fix for #2; prevents a ridiculous amount of varying size permutations.
regex = re . sub ( r " \\ s \ * \ ( \ ?P<([^>]+)> \ . \ + \ ) " , r " \ s*(?P< \ 1> \ S.*) " , regex )
# Experimental fix for #18; removes unnecessary variable-size whitespace
# matching, since we're stripping results anyway.
regex = re . sub ( r " \ [ \ ] \ * \ ( \ ?P<([^>]+)> \ . \ * \ ) " , r " (?P< \ 1>.*) " , regex )
return regex
def parse_registrants ( data , never_query_handles = True , handle_server = " " ) :
registrant = None
tech_contact = None
billing_contact = None
admin_contact = None
registrant_regexes = [
" Registrant:[ ]* \n (?P<organization>.*) \n (?P<name>.*) \n (?P<street>.*) \n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*) \n (?P<country>.*) \n (?: Phone: (?P<phone>.*) \n )? Email: (?P<email>.*) \n " , # Corporate Domains, Inc.
" Registrant: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" (?:Registrant ID:(?P<handle>.+) \n )?Registrant Name:(?P<name>.*) \n (?:Registrant Organization:(?P<organization>.*) \n )?Registrant Street1?:(?P<street1>.*) \n (?:Registrant Street2:(?P<street2>.*) \n )?(?:Registrant Street3:(?P<street3>.*) \n )?Registrant City:(?P<city>.*) \n Registrant State/Province:(?P<state>.*) \n Registrant Postal Code:(?P<postalcode>.*) \n Registrant Country:(?P<country>.*) \n Registrant Phone:(?P<phone>.*) \n (?:Registrant Phone Ext.:(?P<phone_ext>.*) \n )?(?:Registrant FAX:(?P<fax>.*) \n )?(?:Registrant FAX Ext.:(?P<fax_ext>.*) \n )?Registrant Email:(?P<email>.*) " , # Public Interest Registry (.org), nic.pw, No-IP.com
" Registrant ID:(?P<handle>.+) \n Registrant Name:(?P<name>.*) \n (?:Registrant Organization:(?P<organization>.*) \n )?Registrant Address1?:(?P<street1>.*) \n (?:Registrant Address2:(?P<street2>.*) \n )?(?:Registrant Address3:(?P<street3>.*) \n )?Registrant City:(?P<city>.*) \n Registrant State/Province:(?P<state>.*) \n Registrant Country/Economy:(?P<country>.*) \n Registrant Postal Code:(?P<postalcode>.*) \n Registrant Phone:(?P<phone>.*) \n (?:Registrant Phone Ext.:(?P<phone_ext>.*) \n )?(?:Registrant FAX:(?P<fax>.*) \n )?(?:Registrant FAX Ext.:(?P<fax_ext>.*) \n )?Registrant E-mail:(?P<email>.*) " , # .ME, DotAsia
" Registrant ID: \ s*(?P<handle>.+) \n Registrant Name: \ s*(?P<name>.+) \n Registrant Organization: \ s*(?P<organization>.*) \n Registrant Address1: \ s*(?P<street1>.+) \n Registrant Address2: \ s*(?P<street2>.*) \n Registrant City: \ s*(?P<city>.+) \n Registrant State/Province: \ s*(?P<state>.+) \n Registrant Postal Code: \ s*(?P<postalcode>.+) \n Registrant Country: \ s*(?P<country>.+) \n Registrant Country Code: \ s*(?P<country_code>.+) \n Registrant Phone Number: \ s*(?P<phone>.+) \n Registrant Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Registrant Contact: (?P<handle>.+) \n Registrant Organization: (?P<organization>.+) \n Registrant Name: (?P<name>.+) \n Registrant Street: (?P<street>.+) \n Registrant City: (?P<city>.+) \n Registrant Postal Code: (?P<postalcode>.+) \n Registrant State: (?P<state>.+) \n Registrant Country: (?P<country>.+) \n Registrant Phone: (?P<phone>.*) \n Registrant Phone Ext: (?P<phone_ext>.*) \n Registrant Fax: (?P<fax>.*) \n Registrant Fax Ext: (?P<fax_ext>.*) \n Registrant Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Registrant ID:[ ]*(?P<handle>.*) \n )?Registrant Name:[ ]*(?P<name>.*) \n (?:Registrant Organization:[ ]*(?P<organization>.*) \n )?Registrant Street:[ ]*(?P<street1>.+) \n (?:Registrant Street:[ ]*(?P<street2>.+) \n )?(?:Registrant Street:[ ]*(?P<street3>.+) \n )?Registrant City:[ ]*(?P<city>.+) \n Registrant State(?: \ /Province)?:[ ]*(?P<state>.*) \n Registrant Postal Code:[ ]*(?P<postalcode>.+) \n Registrant Country:[ ]*(?P<country>.+) \n (?:Registrant Phone:[ ]*(?P<phone>.*) \n )?(?:Registrant Phone Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Registrant Fax:[ ]*(?P<fax>.*) \n )?(?:Registrant Fax Ext:[ ]*(?P<fax_ext>.*) \n )?(?:Registrant Email:[ ]*(?P<email>.+) \n )? " , # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum), EuroDNS, nic.ps
" Registrant \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n Email:(?P<email>.+) \n (?P<street1>.+) \n (?: (?P<street2>.+) \n )? (?P<postalcode>.+) (?P<city>.+) \n (?P<country>.+) \n Tel: (?P<phone>.+) \n \n " , # internet.bs
" Registrant Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" owner-id:[ ]*(?P<handle>.*) \n (?:owner-organization:[ ]*(?P<organization>.*) \n )?owner-name:[ ]*(?P<name>.*) \n owner-street:[ ]*(?P<street>.*) \n owner-city:[ ]*(?P<city>.*) \n owner-zip:[ ]*(?P<postalcode>.*) \n owner-country:[ ]*(?P<country>.*) \n (?:owner-phone:[ ]*(?P<phone>.*) \n )?(?:owner-fax:[ ]*(?P<fax>.*) \n )?owner-email:[ ]*(?P<email>.*) " , # InterNetworX
" Registrant: \n registrant_org: (?P<organization>.*) \n registrant_name: (?P<name>.*) \n registrant_email: (?P<email>.*) \n registrant_address: (?P<address>.*) \n registrant_city: (?P<city>.*) \n registrant_state: (?P<state>.*) \n registrant_zip: (?P<postalcode>.*) \n registrant_country: (?P<country>.*) \n registrant_phone: (?P<phone>.*) " , # Bellnames
" Holder of domain name: \n (?P<name>[ \ S \ s]+) \n (?P<street>.+) \n (?P<postalcode>[A-Z0-9-]+) \ s+(?P<city>.+) \n (?P<country>.+) \n Contractual Language " , # nic.ch
" \n \n (?:Owner)? \ s+: (?P<name>.*) \n (?: \ s+: (?P<organization>.*) \n )? \ s+: (?P<street>.*) \n \ s+: (?P<city>.*) \n \ s+: (?P<state>.*) \n \ s+: (?P<country>.*) \n " , # nic.io
" Contact Information: \n \ [Name \ ] \ s*(?P<name>.*) \n \ [Email \ ] \ s*(?P<email>.*) \n \ [Web Page \ ] \ s*(?P<url>.*) \n \ [Postal code \ ] \ s*(?P<postalcode>.*) \n \ [Postal Address \ ] \ s*(?P<street1>.*) \n (?: \ s+(?P<street2>.*) \n )?(?: \ s+(?P<street3>.*) \n )? \ [Phone \ ] \ s*(?P<phone>.*) \n \ [Fax \ ] \ s*(?P<fax>.*) \n " , # jprs.jp
" g \ . \ [Organization \ ] (?P<organization>.+) \n " , # .co.jp registrations at jprs.jp
" Registrant ID:(?P<handle>.*) \n Registrant Name:(?P<name>.*) \n (?:Registrant Organization:(?P<organization>.*) \n )?Registrant Address1:(?P<street1>.*) \n (?:Registrant Address2:(?P<street2>.*) \n )?(?:Registrant Address3:(?P<street3>.*) \n )?Registrant City:(?P<city>.*) \n (?:Registrant State/Province:(?P<state>.*) \n )?Registrant Postal Code:(?P<postalcode>.*) \n Registrant Country:(?P<country>.*) \n Registrant Country Code:.* \n Registrant Phone Number:(?P<phone>.*) \n (?:Registrant Facsimile Number:(?P<facsimile>.*) \n )?Registrant Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Registrant \n Name: (?P<name>.+) \n (?: Organization: (?P<organization>.+) \n )? ContactID: (?P<handle>.+) \n (?: Address: (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )?)? (?P<city>.+) \n (?P<postalcode>.+) \n (?P<state>.+) \n (?P<country>.+) \n )?(?: Created: (?P<creationdate>.+) \n )?(?: Last Update: (?P<changedate>.+) \n )? " , # nic.it
" Organisation Name[.]* (?P<name>.*) \n Organisation Address[.]* (?P<street1>.*) \n Organisation Address[.]* (?P<street2>.*) \n (?: Organisation Address[.]* (?P<street3>.*) \n )? Organisation Address[.]* (?P<city>.*) \n Organisation Address[.]* (?P<postalcode>.*) \n Organisation Address[.]* (?P<state>.*) \n Organisation Address[.]* (?P<country>.*) " , # Melbourne IT (what a horrid format...)
" Registrant:[ ]*(?P<name>.+) \n [ \ s \ S]*Eligibility Name:[ ]*(?P<organization>.+) \n [ \ s \ S]*Registrant Contact ID:[ ]*(?P<handle>.+) \n " , # .au business
" Eligibility Type:[ ]*Citizen \ /Resident \n [ \ s \ S]*Registrant Contact ID:[ ]*(?P<handle>.+) \n [ \ s \ S]*Registrant Contact Name:[ ]*(?P<name>.+) \n " , # .au individual
" Registrant:[ ]*(?P<organization>.+) \n [ \ s \ S]*Eligibility Type:[ ]*(Higher Education Institution|Company|Incorporated Association|Other) \n [ \ s \ S]*Registrant Contact ID:[ ]*(?P<handle>.+) \n [ \ s \ S]*Registrant Contact Name:[ ]*(?P<name>.+) \n " , # .au educational, company, 'incorporated association' (non-profit?), other (spotted for linux.conf.au, unsure if also for others)
" Registrant: \n (?P<name>.+) \n \n Registrant type: \n .* \n \n Registrant ' s address: \n The registrant .* opted to have " , # Nominet (.uk) with hidden address
" Registrant: \n (?P<name>.+) \n \n [ \ s \ S]* Registrant type: \n .* \n \n Registrant ' s address: \n (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )??)?? (?P<city>[^0-9 \n ]+) \n (?: (?P<state>.+) \n )? (?P<postalcode>.+) \n (?P<country>.+) \n \n " , # Nominet (.uk) with visible address
" Domain Owner: \n \t (?P<organization>.+) \n \n [ \ s \ S]*?(?:Registrant Contact: \n \t (?P<name>.+))? \n \n Registrant(?: ' s)? (?:a|A)ddress:(?: \n \t (?P<street1>.+) \n (?: \t (?P<street2>.+) \n )?(?: \t (?P<street3>.+) \n )? \t (?P<city>.+) \n \t (?P<postalcode>.+))? \n \t (?P<country>.+)(?: \n \t (?P<phone>.+) \ (Phone \ ) \n \t (?P<fax>.+) \ (FAX \ ) \n \t (?P<email>.+))? \n \n " , # .ac.uk - what a mess...
" Registrant ID: (?P<handle>.+) \n Registrant: (?P<name>.+) \n Registrant Contact Email: (?P<email>.+) " , # .cn (CNNIC)
" Registrant contact: \n (?P<name>.+) \n (?P<street>.*) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n \n " , # Fabulous.com
" registrant-name: \ s*(?P<name>.+) \n registrant-type: \ s*(?P<type>.+) \n registrant-address: \ s*(?P<street>.+) \n registrant-postcode: \ s*(?P<postalcode>.+) \n registrant-city: \ s*(?P<city>.+) \n registrant-country: \ s*(?P<country>.+) \n (?:registrant-phone: \ s*(?P<phone>.+) \n )?(?:registrant-email: \ s*(?P<email>.+) \n )? " , # Hetzner
" Registrant Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Contact Information : For Customer # [0-9]+[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication alternative (private WHOIS) format?
" Registrant: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
" Registrant: \n (?P<name>.+) \n (?P<street>.+) \n (?P<city>.+) (?P<state> \ S+),[ ]+(?P<postalcode>.+) \n (?P<country>.+) " , # .am
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>[^.,]+), (?P<district>.+), (?P<state>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 1
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 2
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+) \n (?:(?P<street2>.+) \n )?(?:(?P<street3>.+) \n )?.+?, (?P<district>.+) \n (?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 3
" Domain Holder: (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)? \n (?P<city>.+),? (?P<state>[A-Z] { 2,3})(?: [A-Z0-9]+)? \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 4
" Registrant: \n (?P<organization>.+) \n (?P<name>.+) (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) \n (?P<street>.*) \n (?P<city>.+), (?P<state>[^, \n ]*) \n (?P<country>.+) \n " , # .com.tw (Western registrars)
" Registrant: \n (?P<organization1>.+) \n (?P<organization2>.+) \n (?P<street1>.+?)(?:,+(?P<street2>.+?)(?:,+(?P<street3>.+?)(?:,+(?P<street4>.+?)(?:,+(?P<street5>.+?)(?:,+(?P<street6>.+?)(?:,+(?P<street7>.+?))?)?)?)?)?)?,(?P<city>.+),(?P<country>.+) \n \n Contact: \n (?P<name>.+) (?P<email>.+) \n TEL: (?P<phone>.+?)(?:(?:#|ext.?)(?P<phone_ext>.+))? \n FAX: (?P<fax>.+)(?:(?:#|ext.?)(?P<fax_ext>.+))? \n " , # .com.tw (TWNIC/SEEDNET, Taiwanese companies only?)
" Registrant Contact Information: \n \n Company English Name \ (It should be the same as the registered/corporation name on your Business Register Certificate or relevant documents \ ):(?P<organization1>.+) \n Company Chinese name:(?P<organization2>.+) \n Address: (?P<street>.+) \n Country: (?P<country>.+) \n Email: (?P<email>.+) \n " , # HKDNR (.hk)
" owner: \ s+(?P<name>.+) " , # .br
" person: \ s+(?P<name>.+) " , # nic.ru (person)
" org: \ s+(?P<organization>.+) " , # nic.ru (organization)
]
tech_contact_regexes = [
" Technical Contact:[ ]* \n (?P<organization>.*) \n (?P<name>.*) \n (?P<street>.*) \n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*) \n (?P<country>.*) \n (?: Phone: (?P<phone>.*) \n )? Email: (?P<email>.*) \n " , # Corporate Domains, Inc.
" Technical Contact: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" (?:Tech ID:(?P<handle>.+) \n )?Tech Name:(?P<name>.*) \n (:?Tech Organization:(?P<organization>.*) \n )?Tech Street1?:(?P<street1>.*) \n (?:Tech Street2:(?P<street2>.*) \n )?(?:Tech Street3:(?P<street3>.*) \n )?Tech City:(?P<city>.*) \n Tech State/Province:(?P<state>.*) \n Tech Postal Code:(?P<postalcode>.*) \n Tech Country:(?P<country>.*) \n Tech Phone:(?P<phone>.*) \n (?:Tech Phone Ext.:(?P<phone_ext>.*) \n )?(?:Tech FAX:(?P<fax>.*) \n )?(?:Tech FAX Ext.:(?P<fax_ext>.*) \n )?Tech Email:(?P<email>.*) " , # Public Interest Registry (.org), nic.pw, No-IP.com
" Tech(?:nical)? ID:(?P<handle>.+) \n Tech(?:nical)? Name:(?P<name>.*) \n (?:Tech(?:nical)? Organization:(?P<organization>.*) \n )?Tech(?:nical)? Address1?:(?P<street1>.*) \n (?:Tech(?:nical)? Address2:(?P<street2>.*) \n )?(?:Tech(?:nical)? Address3:(?P<street3>.*) \n )?Tech(?:nical)? City:(?P<city>.*) \n Tech(?:nical)? State/Province:(?P<state>.*) \n Tech(?:nical)? Country/Economy:(?P<country>.*) \n Tech(?:nical)? Postal Code:(?P<postalcode>.*) \n Tech(?:nical)? Phone:(?P<phone>.*) \n (?:Tech(?:nical)? Phone Ext.:(?P<phone_ext>.*) \n )?(?:Tech(?:nical)? FAX:(?P<fax>.*) \n )?(?:Tech(?:nical)? FAX Ext.:(?P<fax_ext>.*) \n )?Tech(?:nical)? E-mail:(?P<email>.*) " , # .ME, DotAsia
" Technical Contact ID: \ s*(?P<handle>.+) \n Technical Contact Name: \ s*(?P<name>.+) \n Technical Contact Organization: \ s*(?P<organization>.*) \n Technical Contact Address1: \ s*(?P<street1>.+) \n Technical Contact Address2: \ s*(?P<street2>.*) \n Technical Contact City: \ s*(?P<city>.+) \n Technical Contact State/Province: \ s*(?P<state>.+) \n Technical Contact Postal Code: \ s*(?P<postalcode>.+) \n Technical Contact Country: \ s*(?P<country>.+) \n Technical Contact Country Code: \ s*(?P<country_code>.+) \n Technical Contact Phone Number: \ s*(?P<phone>.+) \n Technical Contact Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Tech Contact: (?P<handle>.+) \n Tech Organization: (?P<organization>.+) \n Tech Name: (?P<name>.+) \n Tech Street: (?P<street>.+) \n Tech City: (?P<city>.+) \n Tech Postal Code: (?P<postalcode>.+) \n Tech State: (?P<state>.+) \n Tech Country: (?P<country>.+) \n Tech Phone: (?P<phone>.*) \n Tech Phone Ext: (?P<phone_ext>.*) \n Tech Fax: (?P<fax>.*) \n Tech Fax Ext: (?P<fax_ext>.*) \n Tech Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Tech ID:[ ]*(?P<handle>.*) \n )?Tech[ ]*Name:[ ]*(?P<name>.*) \n (?:Tech[ ]*Organization:[ ]*(?P<organization>.*) \n )?Tech[ ]*Street:[ ]*(?P<street1>.+) \n (?:Tech[ ]*Street:[ ]*(?P<street2>.+) \n )?(?:Tech[ ]*Street:[ ]*(?P<street3>.+) \n )?Tech[ ]*City:[ ]*(?P<city>.+) \n Tech[ ]*State(?: \ /Province)?:[ ]*(?P<state>.*) \n Tech[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+) \n Tech[ ]*Country:[ ]*(?P<country>.+) \n (?:Tech[ ]*Phone:[ ]*(?P<phone>.*) \n )?(?:Tech[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Tech[ ]*Fax:[ ]*(?P<fax>.*) \n )?(?:Tech[ ]*Fax[ ]*Ext: \ s*?(?P<fax_ext>.*) \n )?(?:Tech[ ]*Email:[ ]*(?P<email>.+) \n )? " , # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum), EuroDNS, nic.ps
" Technical Contact \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n Email:(?P<email>.+) \n (?P<street1>.+) \n (?: (?P<street2>.+) \n )? (?P<postalcode>.+) (?P<city>.+) \n (?P<country>.+) \n Tel: (?P<phone>.+) \n \n " , # internet.bs
" Technical Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" tech-id:[ ]*(?P<handle>.*) \n (?:tech-organization:[ ]*(?P<organization>.*) \n )?tech-name:[ ]*(?P<name>.*) \n tech-street:[ ]*(?P<street>.*) \n tech-city:[ ]*(?P<city>.*) \n tech-zip:[ ]*(?P<postalcode>.*) \n tech-country:[ ]*(?P<country>.*) \n (?:tech-phone:[ ]*(?P<phone>.*) \n )?(?:tech-fax:[ ]*(?P<fax>.*) \n )?tech-email:[ ]*(?P<email>.*) " , # InterNetworX
" Technical Contact: \n tech_org: (?P<organization>.*) \n tech_name: (?P<name>.*) \n tech_email: (?P<email>.*) \n tech_address: (?P<address>.*) \n tech_city: (?P<city>.*) \n tech_state: (?P<state>.*) \n tech_zip: (?P<postalcode>.*) \n tech_country: (?P<country>.*) \n tech_phone: (?P<phone>.*) " , # Bellnames
" Technical contact: \n (?P<name>[ \ S \ s]+) \n (?P<street>.+) \n (?P<postalcode>[A-Z0-9-]+) \ s+(?P<city>.+) \n (?P<country>.+) \n \n " , # nic.ch
" Tech Contact ID:[ ]*(?P<handle>.+) \n Tech Contact Name:[ ]*(?P<name>.+) " , # .au
" Technical Contact ID:(?P<handle>.*) \n Technical Contact Name:(?P<name>.*) \n (?:Technical Contact Organization:(?P<organization>.*) \n )?Technical Contact Address1:(?P<street1>.*) \n (?:Technical Contact Address2:(?P<street2>.*) \n )?(?:Technical Contact Address3:(?P<street3>.*) \n )?Technical Contact City:(?P<city>.*) \n (?:Technical Contact State/Province:(?P<state>.*) \n )?Technical Contact Postal Code:(?P<postalcode>.*) \n Technical Contact Country:(?P<country>.*) \n Technical Contact Country Code:.* \n Technical Contact Phone Number:(?P<phone>.*) \n (?:Technical Contact Facsimile Number:(?P<facsimile>.*) \n )?Technical Contact Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Technical Contacts \n Name: (?P<name>.+) \n (?: Organization: (?P<organization>.+) \n )? ContactID: (?P<handle>.+) \n (?: Address: (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )?)? (?P<city>.+) \n (?P<postalcode>.+) \n (?P<state>.+) \n (?P<country>.+) \n )?(?: Created: (?P<creationdate>.+) \n )?(?: Last Update: (?P<changedate>.+) \n )? " , # nic.it // NOTE: Why does this say 'Contacts'? Can it have multiple?
" Tech Name[.]* (?P<name>.*) \n Tech Address[.]* (?P<street1>.*) \n Tech Address[.]* (?P<street2>.*) \n (?: Tech Address[.]* (?P<street3>.*) \n )? Tech Address[.]* (?P<city>.*) \n Tech Address[.]* (?P<postalcode>.*) \n Tech Address[.]* (?P<state>.*) \n Tech Address[.]* (?P<country>.*) \n Tech Email[.]* (?P<email>.*) \n Tech Phone[.]* (?P<phone>.*) \n Tech Fax[.]* (?P<fax>.*) " , # Melbourne IT
" Technical contact: \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n (?P<email>.+) \n (?P<street>.+) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n " , # Fabulous.com
" tech-c-name: \ s*(?P<name>.+) \n tech-c-type: \ s*(?P<type>.+) \n tech-c-address: \ s*(?P<street>.+) \n tech-c-postcode: \ s*(?P<postalcode>.+) \n tech-c-city: \ s*(?P<city>.+) \n tech-c-country: \ s*(?P<country>.+) \n (?:tech-c-phone: \ s*(?P<phone>.+) \n )?(?:tech-c-email: \ s*(?P<email>.+) \n )? " , # Hetzner
" Admin Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Technical contact: \n (?P<name>.+) \n (?P<organization>.*) \n (?P<street>.+) \n (?P<city>.+) (?P<state> \ S+),[ ]+(?P<postalcode>.+) \n (?P<country>.+) \n (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) " , # .am
" Technical: \n \ s*Name: \ s*(?P<name>.*) \n \ s*Organisation: \ s*(?P<organization>.*) \n \ s*Language:.* \n \ s*Phone: \ s*(?P<phone>.*) \n \ s*Fax: \ s*(?P<fax>.*) \n \ s*Email: \ s*(?P<email>.*) \n " , # EURid
" \ [Zone-C \ ] \n Type: (?P<type>.+) \n Name: (?P<name>.+) \n (Organisation: (?P<organization>.+) \n ) { 0,1}(Address: (?P<street1>.+) \n ) {1} (Address: (?P<street2>.+) \n ) { 0,1}(Address: (?P<street3>.+) \n ) { 0,1}(Address: (?P<street4>.+) \n ) { 0,1}PostalCode: (?P<postalcode>.+) \n City: (?P<city>.+) \n CountryCode: (?P<country>[A-Za-z] {2} ) \n Phone: (?P<phone>.+) \n Fax: (?P<fax>.+) \n Email: (?P<email>.+) \n (Remarks: (?P<remark>.+) \n ) { 0,1}Changed: (?P<changed>.+) " , # DeNIC
" Technical Contact: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)? \n (?P<city>.+),? (?P<state>[A-Z] { 2,3})(?: [A-Z0-9]+)? \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 1
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)? \n (?P<city>.+), (?P<state>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 2
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 3
" Tech Contact: (?P<handle>.+) \n (?P<street1>.+) (?P<city>[^ \ s]+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 4
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+) \n (?P<district>.+) (?P<city>[^ \ s]+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 5
" Tech Contact: (?P<handle>.+) \n (?P<organization>.+) \n (?P<street1>.+) \n (?P<street2>.+) \n (?:(?P<street3>.+) \n )?(?P<city>.+) \n (?P<postalcode>.+) \n (?P<country>[A-Z]+) \n " , # .co.th, format 6
" Technical Contact: \n (?P<name>.+) (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) \n " , # .com.tw (Western registrars)
" Technical Contact Information: \n \n (?:Given name: (?P<firstname>.+) \n )?(?:Family name: (?P<lastname>.+) \n )?(?:Company name: (?P<organization>.+) \n )?Address: (?P<street>.+) \n Country: (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n Email: (?P<email>.+) \n (?:Account Name: (?P<handle>.+) \n )? " , # HKDNR (.hk)
]
admin_contact_regexes = [
" Administrative Contact:[ ]* \n (?P<organization>.*) \n (?P<name>.*) \n (?P<street>.*) \n (?P<city>.*), (?P<state>.*) (?P<postalcode>.*) \n (?P<country>.*) \n (?: Phone: (?P<phone>.*) \n )? Email: (?P<email>.*) \n " , # Corporate Domains, Inc.
" Administrative Contact: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" (?:Admin ID:(?P<handle>.+) \n )?Admin Name:(?P<name>.*) \n (?:Admin Organization:(?P<organization>.*) \n )?Admin Street1?:(?P<street1>.*) \n (?:Admin Street2:(?P<street2>.*) \n )?(?:Admin Street3:(?P<street3>.*) \n )?Admin City:(?P<city>.*) \n Admin State/Province:(?P<state>.*) \n Admin Postal Code:(?P<postalcode>.*) \n Admin Country:(?P<country>.*) \n Admin Phone:(?P<phone>.*) \n (?:Admin Phone Ext.:(?P<phone_ext>.*) \n )?(?:Admin FAX:(?P<fax>.*) \n )?(?:Admin FAX Ext.:(?P<fax_ext>.*) \n )?Admin Email:(?P<email>.*) " , # Public Interest Registry (.org), nic.pw, No-IP.com
" Admin(?:istrative)? ID:(?P<handle>.+) \n Admin(?:istrative)? Name:(?P<name>.*) \n (?:Admin(?:istrative)? Organization:(?P<organization>.*) \n )?Admin(?:istrative)? Address1?:(?P<street1>.*) \n (?:Admin(?:istrative)? Address2:(?P<street2>.*) \n )?(?:Admin(?:istrative)? Address3:(?P<street3>.*) \n )?Admin(?:istrative)? City:(?P<city>.*) \n Admin(?:istrative)? State/Province:(?P<state>.*) \n Admin(?:istrative)? Country/Economy:(?P<country>.*) \n Admin(?:istrative)? Postal Code:(?P<postalcode>.*) \n Admin(?:istrative)? Phone:(?P<phone>.*) \n (?:Admin(?:istrative)? Phone Ext.:(?P<phone_ext>.*) \n )?(?:Admin(?:istrative)? FAX:(?P<fax>.*) \n )?(?:Admin(?:istrative)? FAX Ext.:(?P<fax_ext>.*) \n )?Admin(?:istrative)? E-mail:(?P<email>.*) " , # .ME, DotAsia
" Administrative Contact ID: \ s*(?P<handle>.+) \n Administrative Contact Name: \ s*(?P<name>.+) \n Administrative Contact Organization: \ s*(?P<organization>.*) \n Administrative Contact Address1: \ s*(?P<street1>.+) \n Administrative Contact Address2: \ s*(?P<street2>.*) \n Administrative Contact City: \ s*(?P<city>.+) \n Administrative Contact State/Province: \ s*(?P<state>.+) \n Administrative Contact Postal Code: \ s*(?P<postalcode>.+) \n Administrative Contact Country: \ s*(?P<country>.+) \n Administrative Contact Country Code: \ s*(?P<country_code>.+) \n Administrative Contact Phone Number: \ s*(?P<phone>.+) \n Administrative Contact Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Admin Contact: (?P<handle>.+) \n Admin Organization: (?P<organization>.+) \n Admin Name: (?P<name>.+) \n Admin Street: (?P<street>.+) \n Admin City: (?P<city>.+) \n Admin State: (?P<state>.+) \n Admin Postal Code: (?P<postalcode>.+) \n Admin Country: (?P<country>.+) \n Admin Phone: (?P<phone>.*) \n Admin Phone Ext: (?P<phone_ext>.*) \n Admin Fax: (?P<fax>.*) \n Admin Fax Ext: (?P<fax_ext>.*) \n Admin Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Admin ID:[ ]*(?P<handle>.*) \n )?Admin[ ]*Name:[ ]*(?P<name>.*) \n (?:Admin[ ]*Organization:[ ]*(?P<organization>.*) \n )?Admin[ ]*Street:[ ]*(?P<street1>.+) \n (?:Admin[ ]*Street:[ ]*(?P<street2>.+) \n )?(?:Admin[ ]*Street:[ ]*(?P<street3>.+) \n )?Admin[ ]*City:[ ]*(?P<city>.+) \n Admin[ ]*State(?: \ /Province)?:[ ]*(?P<state>.*) \n Admin[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+) \n Admin[ ]*Country:[ ]*(?P<country>.+) \n (?:Admin[ ]*Phone:[ ]*(?P<phone>.*) \n )?(?:Admin[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Admin[ ]*Fax:[ ]*(?P<fax>.*) \n )?(?:Admin[ ]*Fax[ ]*Ext: \ s*?(?P<fax_ext>.*) \n )?(?:Admin[ ]*Email:[ ]*(?P<email>.+) \n )? " , # WildWestDomains, GoDaddy, Namecheap/eNom, Ascio, Musedoma (.museum), EuroDNS, nic.ps
" Administrative Contact \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n Email:(?P<email>.+) \n (?P<street1>.+) \n (?: (?P<street2>.+) \n )? (?P<postalcode>.+) (?P<city>.+) \n (?P<country>.+) \n Tel: (?P<phone>.+) \n \n " , # internet.bs
" Administrative Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" admin-id:[ ]*(?P<handle>.*) \n (?:admin-organization:[ ]*(?P<organization>.*) \n )?admin-name:[ ]*(?P<name>.*) \n admin-street:[ ]*(?P<street>.*) \n admin-city:[ ]*(?P<city>.*) \n admin-zip:[ ]*(?P<postalcode>.*) \n admin-country:[ ]*(?P<country>.*) \n (?:admin-phone:[ ]*(?P<phone>.*) \n )?(?:admin-fax:[ ]*(?P<fax>.*) \n )?admin-email:[ ]*(?P<email>.*) " , # InterNetworX
" Administrative Contact: \n admin_org: (?P<organization>.*) \n admin_name: (?P<name>.*) \n admin_email: (?P<email>.*) \n admin_address: (?P<address>.*) \n admin_city: (?P<city>.*) \n admin_state: (?P<state>.*) \n admin_zip: (?P<postalcode>.*) \n admin_country: (?P<country>.*) \n admin_phone: (?P<phone>.*) " , # Bellnames
" Administrative Contact ID:(?P<handle>.*) \n Administrative Contact Name:(?P<name>.*) \n (?:Administrative Contact Organization:(?P<organization>.*) \n )?Administrative Contact Address1:(?P<street1>.*) \n (?:Administrative Contact Address2:(?P<street2>.*) \n )?(?:Administrative Contact Address3:(?P<street3>.*) \n )?Administrative Contact City:(?P<city>.*) \n (?:Administrative Contact State/Province:(?P<state>.*) \n )?Administrative Contact Postal Code:(?P<postalcode>.*) \n Administrative Contact Country:(?P<country>.*) \n Administrative Contact Country Code:.* \n Administrative Contact Phone Number:(?P<phone>.*) \n (?:Administrative Contact Facsimile Number:(?P<facsimile>.*) \n )?Administrative Contact Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Admin Contact \n Name: (?P<name>.+) \n (?: Organization: (?P<organization>.+) \n )? ContactID: (?P<handle>.+) \n (?: Address: (?P<street1>.+) \n (?: (?P<street2>.+) \n (?: (?P<street3>.+) \n )?)? (?P<city>.+) \n (?P<postalcode>.+) \n (?P<state>.+) \n (?P<country>.+) \n )?(?: Created: (?P<creationdate>.+) \n )?(?: Last Update: (?P<changedate>.+) \n )? " , # nic.it
" Admin Name[.]* (?P<name>.*) \n Admin Address[.]* (?P<street1>.*) \n Admin Address[.]* (?P<street2>.*) \n (?: Admin Address[.]* (?P<street3>.*) \n )? Admin Address[.]* (?P<city>.*) \n Admin Address[.]* (?P<postalcode>.*) \n Admin Address[.]* (?P<state>.*) \n Admin Address[.]* (?P<country>.*) \n Admin Email[.]* (?P<email>.*) \n Admin Phone[.]* (?P<phone>.*) \n Admin Fax[.]* (?P<fax>.*) " , # Melbourne IT
" Administrative contact: \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n (?P<email>.+) \n (?P<street>.+) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n " , # Fabulous.com
" admin-c-name: \ s*(?P<name>.+) \n admin-c-type: \ s*(?P<type>.+) \n admin-c-address: \ s*(?P<street>.+) \n admin-c-postcode: \ s*(?P<postalcode>.+) \n admin-c-city: \ s*(?P<city>.+) \n admin-c-country: \ s*(?P<country>.+) \n (?:admin-c-phone: \ s*(?P<phone>.+) \n )?(?:admin-c-email: \ s*(?P<email>.+) \n )? " , # Hetzner
" Tech Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Administrative contact: \n (?P<name>.+) \n (?P<organization>.*) \n (?P<street>.+) \n (?P<city>.+) (?P<state> \ S+),[ ]+(?P<postalcode>.+) \n (?P<country>.+) \n (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) " , # .am
" Administrative Contact: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
" \ [Tech-C \ ] \n Type: (?P<type>.+) \n Name: (?P<name>.+) \n (Organisation: (?P<organization>.+) \n ) { 0,1}(Address: (?P<street1>.+) \n ) {1} (Address: (?P<street2>.+) \n ) { 0,1}(Address: (?P<street3>.+) \n ) { 0,1}(Address: (?P<street4>.+) \n ) { 0,1}PostalCode: (?P<postalcode>.+) \n City: (?P<city>.+) \n CountryCode: (?P<country>[A-Za-z] {2} ) \n Phone: (?P<phone>.+) \n Fax: (?P<fax>.+) \n Email: (?P<email>.+) \n (Remarks: (?P<remark>.+) \n ) { 0,1}Changed: (?P<changed>.+) " , # DeNIC
" Administrative Contact: \n (?P<name>.+) (?P<email>.+) \n (?P<phone>.*) \n (?P<fax>.*) \n " , # .com.tw (Western registrars)
" Administrative Contact Information: \n \n (?:Given name: (?P<firstname>.+) \n )?(?:Family name: (?P<lastname>.+) \n )?(?:Company name: (?P<organization>.+) \n )?Address: (?P<street>.+) \n Country: (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n Email: (?P<email>.+) \n (?:Account Name: (?P<handle>.+) \n )? " , # HKDNR (.hk)
]
billing_contact_regexes = [
" (?:Billing ID:(?P<handle>.+) \n )?Billing Name:(?P<name>.*) \n Billing Organization:(?P<organization>.*) \n Billing Street1:(?P<street1>.*) \n (?:Billing Street2:(?P<street2>.*) \n )?(?:Billing Street3:(?P<street3>.*) \n )?Billing City:(?P<city>.*) \n Billing State/Province:(?P<state>.*) \n Billing Postal Code:(?P<postalcode>.*) \n Billing Country:(?P<country>.*) \n Billing Phone:(?P<phone>.*) \n (?:Billing Phone Ext.:(?P<phone_ext>.*) \n )?(?:Billing FAX:(?P<fax>.*) \n )?(?:Billing FAX Ext.:(?P<fax_ext>.*) \n )?Billing Email:(?P<email>.*) " , # nic.pw, No-IP.com
" Billing ID:(?P<handle>.+) \n Billing Name:(?P<name>.*) \n (?:Billing Organization:(?P<organization>.*) \n )?Billing Address1?:(?P<street1>.*) \n (?:Billing Address2:(?P<street2>.*) \n )?(?:Billing Address3:(?P<street3>.*) \n )?Billing City:(?P<city>.*) \n Billing State/Province:(?P<state>.*) \n Billing Country/Economy:(?P<country>.*) \n Billing Postal Code:(?P<postalcode>.*) \n Billing Phone:(?P<phone>.*) \n (?:Billing Phone Ext.:(?P<phone_ext>.*) \n )?(?:Billing FAX:(?P<fax>.*) \n )?(?:Billing FAX Ext.:(?P<fax_ext>.*) \n )?Billing E-mail:(?P<email>.*) " , # DotAsia
" Billing Contact ID: \ s*(?P<handle>.+) \n Billing Contact Name: \ s*(?P<name>.+) \n Billing Contact Organization: \ s*(?P<organization>.*) \n Billing Contact Address1: \ s*(?P<street1>.+) \n Billing Contact Address2: \ s*(?P<street2>.*) \n Billing Contact City: \ s*(?P<city>.+) \n Billing Contact State/Province: \ s*(?P<state>.+) \n Billing Contact Postal Code: \ s*(?P<postalcode>.+) \n Billing Contact Country: \ s*(?P<country>.+) \n Billing Contact Country Code: \ s*(?P<country_code>.+) \n Billing Contact Phone Number: \ s*(?P<phone>.+) \n Billing Contact Email: \ s*(?P<email>.+) \n " , # .CO Internet
" Billing Contact: (?P<handle>.+) \n Billing Organization: (?P<organization>.+) \n Billing Name: (?P<name>.+) \n Billing Street: (?P<street>.+) \n Billing City: (?P<city>.+) \n Billing Postal Code: (?P<postalcode>.+) \n Billing State: (?P<state>.+) \n Billing Country: (?P<country>.+) \n Billing Phone: (?P<phone>.*) \n Billing Phone Ext: (?P<phone_ext>.*) \n Billing Fax: (?P<fax>.*) \n Billing Fax Ext: (?P<fax_ext>.*) \n Billing Email: (?P<email>.*) \n " , # Key-Systems GmbH
" (?:Billing ID:[ ]*(?P<handle>.*) \n )?Billing[ ]*Name:[ ]*(?P<name>.*) \n (?:Billing[ ]*Organization:[ ]*(?P<organization>.*) \n )?Billing[ ]*Street:[ ]*(?P<street1>.+) \n (?:Billing[ ]*Street:[ ]*(?P<street2>.+) \n )?Billing[ ]*City:[ ]*(?P<city>.+) \n Billing[ ]*State \ /Province:[ ]*(?P<state>.+) \n Billing[ ]*Postal[ ]*Code:[ ]*(?P<postalcode>.+) \n Billing[ ]*Country:[ ]*(?P<country>.+) \n (?:Billing[ ]*Phone:[ ]*(?P<phone>.*) \n )?(?:Billing[ ]*Phone[ ]*Ext:[ ]*(?P<phone_ext>.*) \n )?(?:Billing[ ]*Fax:[ ]*(?P<fax>.*) \n )?(?:Billing[ ]*Fax[ ]*Ext: \ s*?(?P<fax_ext>.*) \n )?(?:Billing[ ]*Email:[ ]*(?P<email>.+) \n )? " , # Musedoma (.museum)
" Billing Contact: \n (?P<name>.+) \n (?P<street1>.+) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<postalcode>.+), (?P<city>.+) \n (?P<country>.+) \n (?P<phone>.+) \n (?P<email>.+) \n \n " , # OVH
" Billing Contact Details:[ ]* \n (?P<organization>.*) \n (?P<name>.*)[ ] { 2,} \ ((?P<email>.*) \ ) \n (?P<street1>.*) \n (?: (?P<street2>.*) \n )?(?: (?P<street3>.*) \n )? (?P<city>.*) \n (?P<state>.*),(?P<postalcode>.*) \n (?P<country>.*) \n Tel. (?P<phone>.*) " , # Whois.com
" billing-id:[ ]*(?P<handle>.*) \n (?:billing-organization:[ ]*(?P<organization>.*) \n )?billing-name:[ ]*(?P<name>.*) \n billing-street:[ ]*(?P<street>.*) \n billing-city:[ ]*(?P<city>.*) \n billing-zip:[ ]*(?P<postalcode>.*) \n billing-country:[ ]*(?P<country>.*) \n (?:billing-phone:[ ]*(?P<phone>.*) \n )?(?:billing-fax:[ ]*(?P<fax>.*) \n )?billing-email:[ ]*(?P<email>.*) " , # InterNetworX
" Billing Contact: \n bill_org: (?P<organization>.*) \n bill_name: (?P<name>.*) \n bill_email: (?P<email>.*) \n bill_address: (?P<address>.*) \n bill_city: (?P<city>.*) \n bill_state: (?P<state>.*) \n bill_zip: (?P<postalcode>.*) \n bill_country: (?P<country>.*) \n bill_phone: (?P<phone>.*) " , # Bellnames
" Billing Contact ID:(?P<handle>.*) \n Billing Contact Name:(?P<name>.*) \n (?:Billing Contact Organization:(?P<organization>.*) \n )?Billing Contact Address1:(?P<street1>.*) \n (?:Billing Contact Address2:(?P<street2>.*) \n )?(?:Billing Contact Address3:(?P<street3>.*) \n )?Billing Contact City:(?P<city>.*) \n (?:Billing Contact State/Province:(?P<state>.*) \n )?Billing Contact Postal Code:(?P<postalcode>.*) \n Billing Contact Country:(?P<country>.*) \n Billing Contact Country Code:.* \n Billing Contact Phone Number:(?P<phone>.*) \n (?:Billing Contact Facsimile Number:(?P<facsimile>.*) \n )?Billing Contact Email:(?P<email>.*) " , # .US, .biz (NeuStar)
" Billing contact: \n (?: (?P<organization>.+) \n )? (?P<name>.+) \n (?P<email>.+) \n (?P<street>.+) \n (?P<city>.+), (?P<state>.+) (?P<postalcode>.+) (?P<country>.+) \n Phone: (?P<phone>.*) \n Fax: (?P<fax>.*) \n " , # Fabulous.com
" Billing Contact Information :[ ]* \n [ ]+(?P<firstname>.*) \n [ ]+(?P<lastname>.*) \n [ ]+(?P<organization>.*) \n [ ]+(?P<email>.*) \n [ ]+(?P<street>.*) \n [ ]+(?P<city>.*) \n [ ]+(?P<postalcode>.*) \n [ ]+(?P<phone>.*) \n [ ]+(?P<fax>.*) \n \n " , # GAL Communication
" Billing Contact: \n Name: (?P<name>.+) \n City: (?P<city>.+) \n State: (?P<state>.+) \n Country: (?P<country>.+) \n " , # Akky (.com.mx)
]
# Some registries use NIC handle references instead of directly listing contacts...
nic_contact_references = {
" registrant " : [
" registrant: \ s*(?P<handle>.+) " , # nic.at
" owner-contact: \ s*(?P<handle>.+) " , # LCN.com
" holder-c: \ s*(?P<handle>.+) " , # AFNIC
" holder: \ s*(?P<handle>.+) " , # iis.se (they apparently want to be difficult, and won't give you contact info for the handle over their WHOIS service)
] ,
" tech " : [
" tech-c: \ s*(?P<handle>.+) " , # nic.at, AFNIC, iis.se
" technical-contact: \ s*(?P<handle>.+) " , # LCN.com
" n \ . \ [Technical Contact \ ] (?P<handle>.+) \n " , #.co.jp
] ,
" admin " : [
" admin-c: \ s*(?P<handle>.+) " , # nic.at, AFNIC, iis.se
" admin-contact: \ s*(?P<handle>.+) " , # LCN.com
" m \ . \ [Administrative Contact \ ] (?P<handle>.+) \n " , # .co.jp
] ,
" billing " : [
" billing-c: \ s*(?P<handle>.+) " , # iis.se
" billing-contact: \ s*(?P<handle>.+) " , # LCN.com
]
}
# Why do the below? The below is meant to handle with an edge case (issue #2) where a partial match followed
# by a failure, for a regex containing the \s*.+ pattern, would send the regex module on a wild goose hunt for
# matching positions. The workaround is to use \S.* instead of .+, but in the interest of keeping the regexes
# consistent and compact, it's more practical to do this (predictable) conversion on runtime.
# FIXME: This breaks on NIC contact regex for nic.at. Why?
registrant_regexes = [ preprocess_regex ( regex ) for regex in registrant_regexes ]
tech_contact_regexes = [ preprocess_regex ( regex ) for regex in tech_contact_regexes ]
admin_contact_regexes = [ preprocess_regex ( regex ) for regex in admin_contact_regexes ]
billing_contact_regexes = [ preprocess_regex ( regex ) for regex in billing_contact_regexes ]
for segment in data :
for regex in registrant_regexes :
match = re . search ( regex , segment )
@ -848,18 +859,6 @@ def fetch_nic_contact(handle, lookup_server):
raise shared . WhoisException ( " No contact data found in the response. " )
def parse_nic_contact ( data ) :
nic_contact_regexes = [
" personname: \ s*(?P<name>.+) \n organization: \ s*(?P<organization>.+) \n street address: \ s*(?P<street>.+) \n postal code: \ s*(?P<postalcode>.+) \n city: \ s*(?P<city>.+) \n country: \ s*(?P<country>.+) \n (?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:e-mail: \ s*(?P<email>.+) \n )?nic-hdl: \ s*(?P<handle>.+) \n changed: \ s*(?P<changedate>.+) " , # nic.at
" contact-handle:[ ]*(?P<handle>.+) \n contact:[ ]*(?P<name>.+) \n (?:organisation:[ ]*(?P<organization>.+) \n )?address:[ ]*(?P<street1>.+) \n (?:address:[ ]*(?P<street2>.+) \n )?(?:address:[ ]*(?P<street3>.+) \n )?(?:address:[ ]*(?P<street4>.+) \n )?address:[ ]*(?P<city>.+) \n address:[ ]*(?P<state>.+) \n address:[ ]*(?P<postalcode>.+) \n address:[ ]*(?P<country>.+) \n (?:phone:[ ]*(?P<phone>.+) \n )?(?:fax:[ ]*(?P<fax>.+) \n )?(?:email:[ ]*(?P<email>.+) \n )? " , # LCN.com
" Contact Information: \n a \ . \ [JPNIC Handle \ ] (?P<handle>.+) \n c \ . \ [Last, First \ ] (?P<lastname>.+), (?P<firstname>.+) \n d \ . \ [E-Mail \ ] (?P<email>.+) \n g \ . \ [Organization \ ] (?P<organization>.+) \n l \ . \ [Division \ ] (?P<division>.+) \n n \ . \ [Title \ ] (?P<title>.+) \n o \ . \ [TEL \ ] (?P<phone>.+) \n p \ . \ [FAX \ ] (?P<fax>.+) \n y \ . \ [Reply Mail \ ] .* \n \ [Last Update \ ] (?P<changedate>.+) \ (JST \ ) \n " , # JPRS .co.jp contact handle lookup
" person: \ s*(?P<name>.+) \n nic-hdl: \ s*(?P<handle>.+) \n " , # .ie
" nic-hdl: \ s+(?P<handle>.+) \n person: \ s+(?P<name>.+) \n (?:e-mail: \ s+(?P<email>.+) \n )?(?:address: \ s+(?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+), (?P<state>.+), (?P<country>.+) \n )?(?:phone: \ s+(?P<phone>.+) \n )?(?:fax-no: \ s+(?P<fax>.+) \n )? " , # nic.ir, individual - this is a nasty one.
" nic-hdl: \ s+(?P<handle>.+) \n org: \ s+(?P<organization>.+) \n (?:e-mail: \ s+(?P<email>.+) \n )?(?:address: \ s+(?P<street1>.+?)(?:,+ (?P<street2>.+?)(?:,+ (?P<street3>.+?)(?:,+ (?P<street4>.+?)(?:,+ (?P<street5>.+?)(?:,+ (?P<street6>.+?)(?:,+ (?P<street7>.+?))?)?)?)?)?)?, (?P<city>.+), (?P<state>.+), (?P<country>.+) \n )?(?:phone: \ s+(?P<phone>.+) \n )?(?:fax-no: \ s+(?P<fax>.+) \n )? " , # nic.ir, organization
" nic-hdl: \ s*(?P<handle>.+) \n type: \ s*(?P<type>.+) \n contact: \ s*(?P<name>.+) \n (?:.+ \n )*?(?:address: \ s*(?P<street1>.+) \n address: \ s*(?P<street2>.+) \n address: \ s*(?P<street3>.+) \n address: \ s*(?P<country>.+) \n )?(?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:.+ \n )*?(?:e-mail: \ s*(?P<email>.+) \n )?(?:.+ \n )*?changed: \ s*(?P<changedate>[0-9] {2} \ /[0-9] {2} \ /[0-9] {4} ).* \n " , # AFNIC madness without country field
" nic-hdl: \ s*(?P<handle>.+) \n type: \ s*(?P<type>.+) \n contact: \ s*(?P<name>.+) \n (?:.+ \n )*?(?:address: \ s*(?P<street1>.+) \n )?(?:address: \ s*(?P<street2>.+) \n )?(?:address: \ s*(?P<street3>.+) \n )?(?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:.+ \n )*?(?:e-mail: \ s*(?P<email>.+) \n )?(?:.+ \n )*?changed: \ s*(?P<changedate>[0-9] {2} \ /[0-9] {2} \ /[0-9] {4} ).* \n " , # AFNIC madness any country -at all-
" nic-hdl: \ s*(?P<handle>.+) \n type: \ s*(?P<type>.+) \n contact: \ s*(?P<name>.+) \n (?:.+ \n )*?(?:address: \ s*(?P<street1>.+) \n )?(?:address: \ s*(?P<street2>.+) \n )?(?:address: \ s*(?P<street3>.+) \n )?(?:address: \ s*(?P<street4>.+) \n )?country: \ s*(?P<country>.+) \n (?:phone: \ s*(?P<phone>.+) \n )?(?:fax-no: \ s*(?P<fax>.+) \n )?(?:.+ \n )*?(?:e-mail: \ s*(?P<email>.+) \n )?(?:.+ \n )*?changed: \ s*(?P<changedate>[0-9] {2} \ /[0-9] {2} \ /[0-9] {4} ).* \n " , # AFNIC madness with country field
]
handle_contacts = [ ]
for regex in nic_contact_regexes :
for segment in data :