tool::regex-guide
regex email
/^[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}$/i
Email Address Validation
Regex Pattern
/^[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}$/iFlags:
iPattern Breakdown
^Start of string[a-zA-Z0-9._%+\-]+Local part: letters, digits, dots, special chars@Literal @ symbol (required)[a-zA-Z0-9.\-]+Domain name: letters, digits, dots, hyphens\.Literal dot before TLD[a-zA-Z]{2,}TLD: at least 2 letters (com, org, io…)$End of stringMatching Examples
✓
user@example.com✓
name.surname+tag@sub.domain.org✓
dev@company.ioNon-Matching Examples
✗
user@✗
@domain.com✗
no-at-sign.com✗
user @example.comA practical email validation pattern based on RFC 5322. It covers the local part (before @) and domain part (after @) for the most common email formats. Note: internationalized domains (IDN) and IP-literal domains require additional handling.
Language Usage
Common Use Cases
- ▸Validate email fields on sign-up forms
- ▸Check newsletter subscription email inputs
- ▸Verify email column format in databases
- ▸Clean email data in CSV or Excel files
- ▸Validate email fields in API request bodies
Related Patterns
ad · 300×250
// related tools