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

modify regex to include multiple subdomains #123

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

obeidareda37
Copy link
Member

@obeidareda37 obeidareda37 commented Dec 13, 2024

Explanation:

  • ^[a-zA-Z0-9._%+-]+: Matches the local part of the email (before the @).
  • @[a-zA-Z0-9.-]+: Matches the domain part (allows subdomains and hyphens).
  • .[a-zA-Z]{2,}$: Matches the top-level domain (TLD), ensuring it's at least two characters long.

This updated regex should correctly validate emails like [email protected].

@salahamassi salahamassi merged commit 4df49d8 into main Dec 19, 2024
@salahamassi salahamassi deleted the email_regex_validation_fix branch December 19, 2024 18:59
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

Successfully merging this pull request may close these issues.

2 participants