Email Regex Tester
Test and validate email patterns with this specialized regex tester. Includes tested patterns and real-time matching.
Recommended Email Pattern
``regex
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
`
Test Examples
Valid matches:
- user@example.com
john.doe@company.orgtest+label@gmail.com
Invalid (should not match):
user@@example.comuser@.comuser@com
Pattern Explanation
Matches standard email format: local part, @ symbol, domain, and TLD (2+ chars)
Alternative Patterns
1. ^[\w.-]+@[\w.-]+\.\w{2,}$
2. ^.+@.+\..+$`
How to Use
1. The pattern above is preloaded—or enter your own 2. Add test strings to validate 3. See real-time match highlights 4. Copy the pattern for your code
Regex Quick Reference
| Symbol | Meaning | Example | ||
|---|---|---|---|---|
| \d | Any digit | \d{3} matches "123" | ||
| \w | Word character | \w+ matches "hello" | ||
| + | One or more | a+ matches "aaa" | ||
| * | Zero or more | a* matches "" or "aaa" | ||
| ? | Optional | colou?r matches "color" | ||
| ^ | Start of string | ^Hello | ||
| $ | End of string | world$ | ||
| [abc] | Character class | [aeiou] matches vowels | ||
| (a | b) | Alternation | (cat | dog) matches either |