-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathparser_ir.go
More file actions
33 lines (27 loc) · 996 Bytes
/
parser_ir.go
File metadata and controls
33 lines (27 loc) · 996 Bytes
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 irParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`no entries found`),
RateLimit: nil,
MalformedRequest: regexp.MustCompile(`no entries found`),
},
registrarRegex: &RegistrarRegex{
DomainName: regexp.MustCompile(`domain: *(.+)`),
ExpirationDate: regexp.MustCompile(`expire-date: *(.+)`),
NameServers: regexp.MustCompile(`nserver: *(.+)`),
UpdatedDate: regexp.MustCompile(`last-updated: *(.+)`),
},
registrantRegex: &RegistrantRegex{
Name: regexp.MustCompile(`\(Domain Holder\) *(.+)`),
City: regexp.MustCompile(`\(Domain Holder Address\)(?:.*, (.*)(?:.*, (?:.*),))`),
Province: regexp.MustCompile(`\(Domain Holder Address\)(?:.*, (.*),)`),
Country: regexp.MustCompile(`\(Domain Holder Address\)(?:.*, (.*))`),
Street: regexp.MustCompile(`\(Domain Holder Address\)(?:.*, (.*), (?:.*, (?:.*),))`),
},
}
func init() {
RegisterParser(".ir", irParser)
}