python CheckUtils(邮箱验证、url验证、手机验证)

#!/usr/bin/env python
# coding=utf-8
# https://github.com/BingLau7/Threshold/blob/244fabd7758841ad4dd2eb8c30b1ce81a083c2fa/threshold/utils.py
import re


class VerifiedExpression:
    EMAIL_ADDRESS_REG = re.compile(
        r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"  # dot-atom
        r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-\011\013\014\016-\177])*")'
        r'@(?:[A-Z0-9](?:[A-Z0-9-]{0,247}[A-Z0-9])?\.)+(?:[A-Z]{2,6}|[A-Z0-9-]{2,}(?

你可能感兴趣的:(Django)