@ -9,7 +9,7 @@ const (
alphaUnicodeNumericRegexString = "^[\\p{L}\\p{N}]+$"
alphaUnicodeNumericRegexString = "^[\\p{L}\\p{N}]+$"
numericRegexString = "^[-+]?[0-9]+(?:\\.[0-9]+)?$"
numericRegexString = "^[-+]?[0-9]+(?:\\.[0-9]+)?$"
numberRegexString = "^[0-9]+$"
numberRegexString = "^[0-9]+$"
hexadecimalRegexString = "^[0-9a-fA-F]+$"
hexadecimalRegexString = "^(0[xX])? [0-9a-fA-F]+$"
hexcolorRegexString = "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
hexcolorRegexString = "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$"
rgbRegexString = "^rgb\\(\\s*(?:(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])|(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%)\\s*\\)$"
rgbRegexString = "^rgb\\(\\s*(?:(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])|(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%)\\s*\\)$"
rgbaRegexString = "^rgba\\(\\s*(?:(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])|(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%)\\s*,\\s*(?:(?:0.[1-9]*)|[01])\\s*\\)$"
rgbaRegexString = "^rgba\\(\\s*(?:(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])|(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%\\s*,\\s*(?:0|[1-9]\\d?|1\\d\\d?|2[0-4]\\d|25[0-5])%)\\s*,\\s*(?:(?:0.[1-9]*)|[01])\\s*\\)$"
@ -36,7 +36,7 @@ const (
latitudeRegexString = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$"
latitudeRegexString = "^[-+]?([1-8]?\\d(\\.\\d+)?|90(\\.0+)?)$"
longitudeRegexString = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$"
longitudeRegexString = "^[-+]?(180(\\.0+)?|((1[0-7]\\d)|([1-9]?\\d))(\\.\\d+)?)$"
sSNRegexString = ` ^[0-9] { 3}[ -]?(0[1-9]|[1-9][0-9])[ -]?([1-9][0-9] { 3}|[0-9][1-9][0-9] { 2}|[0-9] { 2}[1-9][0-9]|[0-9] { 3}[1-9])$ `
sSNRegexString = ` ^[0-9] { 3}[ -]?(0[1-9]|[1-9][0-9])[ -]?([1-9][0-9] { 3}|[0-9][1-9][0-9] { 2}|[0-9] { 2}[1-9][0-9]|[0-9] { 3}[1-9])$ `
hostnameRegexStringRFC952 = ` ^[a-zA-Z]([a-zA-Z0-9\-]+[\.]?)*[a-zA-Z0-9]$ ` // https://tools.ietf.org/html/rfc952
hostnameRegexStringRFC952 = ` ^[a-zA-Z]([a-zA-Z0-9\-]+[\.]?)*[a-zA-Z0-9]$ ` // https://tools.ietf.org/html/rfc952
hostnameRegexStringRFC1123 = ` ^([a-zA-Z0-9] { 1}[a-zA-Z0-9_-] { 0,62}) { 1}(\.[a-zA-Z0-9_] { 1}[a-zA-Z0-9_-] { 0,62})*?$ ` // accepts hostname starting with a digit https://tools.ietf.org/html/rfc1123
hostnameRegexStringRFC1123 = ` ^([a-zA-Z0-9] { 1}[a-zA-Z0-9_-] { 0,62}) { 1}(\.[a-zA-Z0-9_] { 1}[a-zA-Z0-9_-] { 0,62})*?$ ` // accepts hostname starting with a digit https://tools.ietf.org/html/rfc1123
fqdnRegexStringRFC1123 = ` ^([a-zA-Z0-9] { 1}[a-zA-Z0-9_-] { 0,62})(\.[a-zA-Z0-9_] { 1}[a-zA-Z0-9_-] { 0,62})*?(\.[a-zA-Z] { 1}[a-zA-Z0-9] { 0,62})\.?$ ` // same as hostnameRegexStringRFC1123 but must contain a non numerical TLD (possibly ending with '.')
fqdnRegexStringRFC1123 = ` ^([a-zA-Z0-9] { 1}[a-zA-Z0-9_-] { 0,62})(\.[a-zA-Z0-9_] { 1}[a-zA-Z0-9_-] { 0,62})*?(\.[a-zA-Z] { 1}[a-zA-Z0-9] { 0,62})\.?$ ` // same as hostnameRegexStringRFC1123 but must contain a non numerical TLD (possibly ending with '.')
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