Skip to content

Commit

Permalink
Update regex
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-dequenne-sonarsource committed Apr 16, 2023
1 parent cddb0fe commit 8cb4912
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pokedex/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def fetch_all_pokemons(wrapper: ConnectionWrapper):


def register_subscriber(wrapper: ConnectionWrapper, email):
pattern = re.compile(r"(\w|[a-zA-Z0-9_])+@\w+\..+")
pattern = re.compile(r"(.*)@(.*\..*)")
if not pattern.match(email):
ValueError("Invalid email!")
wrapper.register_subscriber(email)
Expand Down

0 comments on commit 8cb4912

Please sign in to comment.