Back
Syntax
Study
Editor
Mode:
HTML
CSS
JavaScript
PHP
Reset
Run »
HTML / CSS / JS
import re email_re = re.compile(r"[\w.-]+@[\w.-]+\.\w+") emails = [ "user@example.com", "invalid-email", "other@domain.org", ] for e in emails: if email_re.match(e): print(f"Valid: {e}")
Result
Open