Back to list

RegEx Nightmare 😱

Lv.4232@mukitaro127 playsDec 28, 2025

Welcome to symbol hell. This is a complex email validation pattern. Can your pinky finger survive this?

preview.python
Python
1import re
2def check_email(email):
3 pattern = r"(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)"
4 if re.match(pattern, email):
5 print(f"'{email}' is valid.")
6 else:
7 print(f"'{email}' is invalid.")
8
9check_email("user.name@example.com")

Custom problems are not included in rankings