Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Email regex does not match user.name-secondname@domain.com #64

Open
marvin1973 opened this issue Jun 29, 2020 · 2 comments
Open

Email regex does not match user.name-secondname@domain.com #64

marvin1973 opened this issue Jun 29, 2020 · 2 comments

Comments

@marvin1973
Copy link

Email regex does not match user.name-secondname@domain.com oder an other Adresse with valid "-" before @

It should be

def _is_email(self, email):
    pattern = r'[\-\.\w]+@[-\.\w]+\.\w+'
    if re.fullmatch(pattern, email):
        return True
@YohanRodriguezMDM
Copy link

Same error here with user.name@twopart-domain.com

@YohanRodriguezMDM
Copy link

On gmail you could also have an email address like user+label@gmail.com, so character '+' should be added to the regex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants