Email Address Regex Pattern
Validates standard email addresses with username, @ symbol, domain, and TLD. Covers most common email formats used in web forms.
Live Regex Tester
Pattern Breakdown
Code Examples
JavaScript
const regex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
const test = "[email protected]";
console.log(regex.test(test)); // true
// Extract matches
const matches = test.match(regex);
console.log(matches);Python
import re
pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
test = "[email protected]"
match = re.search(pattern, test)
print(match) # Found!Go
package main
import (
"fmt"
"regexp"
)
func main() {
re := regexp.MustCompile(`^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`)
fmt.Println(re.MatchString("[email protected]")) // true
}Common Use Cases
Match Examples
| Input | Result |
|---|---|
| [email protected] | Match |
| [email protected] | No Match |
About the Email Address Regex
Validates standard email addresses with username, @ symbol, domain, and TLD. Covers most common email formats used in web forms.
Regular expressions (regex) are powerful pattern matching tools used across virtually all programming languages. The email address pattern is classified as beginner difficulty in the validation category. It works in all major programming languages.
When using this regex, always consider edge cases and test thoroughly with real-world data. Use the interactive tester above to validate the pattern against your specific inputs before deploying to production.
More Validation Patterns
Need More Regex Patterns?
Browse our complete library of 100+ regex patterns with interactive testers.
Frequently Asked Questions
What is the Email Address regex pattern?
Validates standard email addresses with username, @ symbol, domain, and TLD. Covers most common email formats used in web forms.
How do I use the Email Address regex?
Use the pattern /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/ in your code. In JavaScript: new RegExp('^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$', ''). Test it above with your own input.
What does this Email Address regex match?
This pattern matches: "[email protected]". It does NOT match: "[email protected]". Form validation, data extraction, contact scraping.
Is the Email Address regex beginner-friendly?
This pattern is rated Beginner. It uses basic regex syntax and is easy to understand.
What languages support the Email Address regex?
This pattern works in all major programming languages including JavaScript, Python, Java, C#, Go, Ruby, PHP, and more. Syntax may vary slightly between regex engines.
Can I modify the Email Address regex for my use case?
Yes! Use the interactive tester above to modify the pattern and test with your own data. Common modifications include making it case-insensitive (add 'i' flag), matching globally (add 'g' flag), or adjusting character classes.