parasite._const
¶
Member Reference¶
- parasite._const.RE_EMAIL = re.compile("^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$")¶
Regex pattern for email validation as per RFC2822 standards.
- Attribution:
https://regexr.com/2rhq7, by Tripleaxis (from .NET helpfiles)
- parasite._const.RE_URL = re.compile("^((\\w+:\\/\\/)[-a-zA-Z0-9:@;?&=\\/%\\+\\.\\*!'\\(\\),\\$_\\{\\}\\^~\\[\\]`#|]+)$")¶
Regex pattern for URL/URI validation.
- Attribution:
https://regexr.com/2ri7q, by Gabriel Mariani
- parasite._const.RE_UUID = re.compile('^[0-9A-Za-z]{8}-[0-9A-Za-z]{4}-4[0-9A-Za-z]{3}-[89ABab][0-9A-Za-z]{3}-[0-9A-Za-z]{12}$')¶
Regex pattern validation for UUID v4 as per RFC9562.
- Attribution:
- parasite._const.RE_CUID = re.compile('^c[^\\\\s-]{8,}$')¶
Regex pattern for CUID validation.
- parasite._const.RE_CUID2 = re.compile('^[a-z][a-z0-9]*$')¶
Regex pattern for CUID2 validation.
- parasite._const.RE_ULID = re.compile('^[0-9A-HJKMNP-TV-Z]{26}$')¶
Regex pattern for ULID validation.
- parasite._const.RE_IPV4 = re.compile('^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$')¶
Regex pattern for IPv4 validation.
- parasite._const.RE_IPV6 = re.compile('^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-)¶
Regex pattern for IPv6 validation.