-
Notifications
You must be signed in to change notification settings - Fork 3
/
parser_uk.go
33 lines (29 loc) · 1.05 KB
/
parser_uk.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package whoisparser
import (
"regexp"
)
var ukParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`No match for`),
RateLimit: regexp.MustCompile(`the WHOIS query quota for`),
MalformedRequest: regexp.MustCompile(`This domain cannot be registered because it contravenes`),
},
registrarRegex: &RegistrarRegex{
CreatedDate: regexp.MustCompile(`Relevant dates:\s *Registered on: *(.*)`),
DomainDNSSEC: nil,
DomainID: nil,
DomainName: regexp.MustCompile(`Domain name:\s *(.*)`),
DomainStatus: regexp.MustCompile(`Registration status:\s *(.*)`),
Emails: nil,
ExpirationDate: regexp.MustCompile(`Relevant dates:(?:.*\s)+Expiry date: *(.*)`),
NameServers: regexp.MustCompile(`(?s)Name servers:\s *(.*?)+?\n\n`),
ReferralURL: nil,
RegistrarID: nil,
RegistrarName: regexp.MustCompile(`Registrar:\s *(.*)`),
UpdatedDate: regexp.MustCompile(`Relevant dates:(?:.*\s)+Last updated: *(.*)`),
WhoisServer: nil,
},
}
func init() {
RegisterParser(".uk", ukParser)
}