|
|
@ -33,7 +33,8 @@ const ( |
|
|
|
hostnameRegexStringRFC952 = `^[a-zA-Z][a-zA-Z0-9\-\.]+[a-z-Az0-9]$` // https://tools.ietf.org/html/rfc952
|
|
|
|
hostnameRegexStringRFC952 = `^[a-zA-Z][a-zA-Z0-9\-\.]+[a-z-Az0-9]$` // https://tools.ietf.org/html/rfc952
|
|
|
|
hostnameRegexStringRFC1123 = `^[a-zA-Z0-9][a-zA-Z0-9\-\.]+[a-z-Az0-9]$` // accepts hostname starting with a digit https://tools.ietf.org/html/rfc1123
|
|
|
|
hostnameRegexStringRFC1123 = `^[a-zA-Z0-9][a-zA-Z0-9\-\.]+[a-z-Az0-9]$` // accepts hostname starting with a digit https://tools.ietf.org/html/rfc1123
|
|
|
|
btcAddressRegexString = `^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$` // bitcoin address
|
|
|
|
btcAddressRegexString = `^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$` // bitcoin address
|
|
|
|
btcAddressRegexStringBech32 = `^([bB][cC]1)[02-9ac-hj-np-zAC-HJ-NP-Z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32
|
|
|
|
btcAddressUpperRegexStringBech32 = `^BC1[02-9AC-HJ-NP-Z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32
|
|
|
|
|
|
|
|
btcAddressLowerRegexStringBech32 = `^bc1[02-9ac-hj-np-z]{7,76}$` // bitcoin bech32 address https://en.bitcoin.it/wiki/Bech32
|
|
|
|
ethAddressRegexString = `^0x[0-9a-fA-F]{40}$` |
|
|
|
ethAddressRegexString = `^0x[0-9a-fA-F]{40}$` |
|
|
|
ethAddressUpperRegexString = `^0x[0-9A-F]{40}$` |
|
|
|
ethAddressUpperRegexString = `^0x[0-9A-F]{40}$` |
|
|
|
ethAddressLowerRegexString = `^0x[0-9a-f]{40}$` |
|
|
|
ethAddressLowerRegexString = `^0x[0-9a-f]{40}$` |
|
|
@ -70,7 +71,8 @@ var ( |
|
|
|
hostnameRegexRFC952 = regexp.MustCompile(hostnameRegexStringRFC952) |
|
|
|
hostnameRegexRFC952 = regexp.MustCompile(hostnameRegexStringRFC952) |
|
|
|
hostnameRegexRFC1123 = regexp.MustCompile(hostnameRegexStringRFC1123) |
|
|
|
hostnameRegexRFC1123 = regexp.MustCompile(hostnameRegexStringRFC1123) |
|
|
|
btcAddressRegex = regexp.MustCompile(btcAddressRegexString) |
|
|
|
btcAddressRegex = regexp.MustCompile(btcAddressRegexString) |
|
|
|
btcAddressRegexBech32 = regexp.MustCompile(btcAddressRegexStringBech32) |
|
|
|
btcUpperAddressRegexBech32 = regexp.MustCompile(btcAddressUpperRegexStringBech32) |
|
|
|
|
|
|
|
btcLowerAddressRegexBech32 = regexp.MustCompile(btcAddressLowerRegexStringBech32) |
|
|
|
ethAddressRegex = regexp.MustCompile(ethAddressRegexString) |
|
|
|
ethAddressRegex = regexp.MustCompile(ethAddressRegexString) |
|
|
|
ethaddressRegexUpper = regexp.MustCompile(ethAddressUpperRegexString) |
|
|
|
ethaddressRegexUpper = regexp.MustCompile(ethAddressUpperRegexString) |
|
|
|
ethAddressRegexLower = regexp.MustCompile(ethAddressLowerRegexString) |
|
|
|
ethAddressRegexLower = regexp.MustCompile(ethAddressLowerRegexString) |
|
|
|