Validation
Email Domain Part (After @)
Validate just the domain portion of an email address — the bit after the @.
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
^[a-zA-Z0-9](?:[a-zA-Z0-9.\-]{0,253}[a-zA-Z0-9])?\.[a-zA-Z]{2,24}$Raw source: ^[a-zA-Z0-9](?:[a-zA-Z0-9.\-]{0,253}[a-zA-Z0-9])?\.[a-zA-Z]{2,24}$
How it works
Starts and ends with alphanumeric per RFC. Allows dots and hyphens in the middle. Length capped at 255 chars total. Trailing \.[a-zA-Z]{2,24}$ requires a TLD of 2–24 characters (covers everything from `.io` to `.international`).
Examples
Input
example.comMatches
example.com
Input
mail.sub.domain.orgMatches
mail.sub.domain.org
Input
no-tldNo match
—Common use cases
- •Splitting an email and re-validating each half independently
- •Enterprise allowlists (only @company.com)
- •Domain-level analytics on mailing lists
- •Custom-domain validation in SaaS sign-up
Related patterns
Email Local Part (Before @)
ValidationValidate just the local part of an email address (the bit before the @).
Email Address Validation
ValidationMatch and validate email addresses in the standard user@domain.tld format.
BCP 47 Language Tag
ValidationValidate BCP 47 language tags like `en`, `en-US`, `zh-Hant-TW`, or `pt-BR`.
Cron Expression
ValidationValidate standard 5-field Unix cron expressions: minute, hour, day-of-month, month, day-of-week.