'Return a regex pattern matching valid email addresses. Uses the same
logic as the django validator, with the folowing exceptions:
- Internationalized domain names not supported
- IP addresses not supported
- Strips lookbehinds (not supported in javascript regular expressions)'

def get_email_regex(self):

    validator = self.default_validators[0]
    user_regex = validator.user_regex.pattern.replace(u'\\Z', u'@')
    domain_patterns = ([(re.escape(domain) + u'$') for domain in validator.domain_whitelist] + [validator.domain_regex.pattern.replace(u'\\Z', u'$')])
    domain_regex = u'({0})'.format(u'|'.join(domain_patterns))
    email_regex = (user_regex + domain_regex)
    return re.sub(u'\\(\\?\\<[^()]*?\\)', u'', email_regex)
