-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathparser_ar.go
More file actions
31 lines (26 loc) · 922 Bytes
/
parser_ar.go
File metadata and controls
31 lines (26 loc) · 922 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
package whoisparser
import (
"regexp"
)
var arParser = &Parser{
errorRegex: &ParseErrorRegex{
NoSuchDomain: regexp.MustCompile(`El dominio no se encuentra registrado en NIC Argentina`),
RateLimit: nil, //failed to call rate-limit for .ar
MalformedRequest: nil, //MalformedRequest and NoSuchDomain same
},
registrarRegex: &RegistrarRegex{
DomainName: regexp.MustCompile(`domain:\s*(.+)`),
RegistrarName: regexp.MustCompile(`registrar:\s*(.+)`),
CreatedDate: regexp.MustCompile(`registered:\s*(.+)`),
UpdatedDate: regexp.MustCompile(`domain:(?:.*\s)+changed:\s*(.*)\nexpire`),
ExpirationDate: regexp.MustCompile(`expire:\s*(.+)`),
NameServers: regexp.MustCompile(`nserver:\s*(.+)`),
},
registrantRegex: &RegistrantRegex{
Name: regexp.MustCompile(`name:\s*(.+)`),
ID: regexp.MustCompile(`registrant:\s*(.+)`),
},
}
func init() {
RegisterParser(".ar", arParser)
}