-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathparser_co_jp.go
41 lines (33 loc) · 1.18 KB
/
parser_co_jp.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
34
35
36
37
38
39
40
41
package whoisparser
import (
"regexp"
)
var coJpParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`No match!`),
RateLimit: regexp.MustCompile(`Cannot process your search request`),
MalformedRequest: regexp.MustCompile(`<JPRS WHOIS HELP>`),
},
registrarRegex: &RegistrarRegex{
CreatedDate: regexp.MustCompile(`\[Registered Date\] *(.+)`),
DomainName: regexp.MustCompile(`(?i)\[Domain Name] *(.+)`),
DomainStatus: regexp.MustCompile(`(?i)\[Status] *(.+)`),
Emails: regexp.MustCompile(`(?i)(` + EmailRegex + `)`),
ExpirationDate: regexp.MustCompile(`\[State\] *(.+)`),
NameServers: regexp.MustCompile(`(?i)\[Name Server] *(.+)`),
UpdatedDate: regexp.MustCompile(`\[Last Update\] *(.+)`),
},
registrantRegex: &RegistrantRegex{
Name: regexp.MustCompile(`(?i)\[Registrant] *(.+)`),
Organization: regexp.MustCompile(`(?i)\[Organization] *(.+)`),
},
adminRegex: &RegistrantRegex{
ID: regexp.MustCompile(`(?i)\[Administrative Contact] *(.+)`),
},
techRegex: &RegistrantRegex{
ID: regexp.MustCompile(`(?i)\[Technical Contact] *(.+)`),
},
}
func init() {
RegisterParser(".co.jp", coJpParser)
}