© 2026 Email Awesome. All rights reserved.
Claim & start

An email regex checks whether text matches a chosen pattern. It does not query DNS, test a mailbox or prove that a user controls an address. For most web forms, start with a native email input and a maintained server-side validator. Use a custom expression only when its accepted input policy is explicit and tested.
<label for="email">Email address</label>
<input id="email" name="email" type="email" required
autocomplete="email">The browser applies its email-input validity rules; it does not establish mailbox existence. Client-side validation can be bypassed, so validate again on the server. The HTML specification defines the email input's behavior.
// A deliberately limited shape check, not an RFC validator.
const shape = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
console.assert(shape.test('alex+news@example.com'));
console.assert(!shape.test('alex@@example.com'));
console.assert(shape.test('alex..smith@example.com')); // false positive
console.assert(!shape.test('"alex smith"@example.com')); // excluded formThis expression requires non-whitespace text around a single at sign and a dot in the domain portion. It is intentionally incomplete: it accepts consecutive dots in the local part and excludes some quoted forms. It is not an official RFC validator or an exact implementation of the HTML email-input algorithm.
import re
shape = re.compile(r"[^\s@]+@[^\s@]+\.[^\s@]+")
assert shape.fullmatch("alex+news@example.com") is not None
assert shape.fullmatch("alex@@example.com") is None
assert shape.fullmatch("alex@example.com\n") is None
assert shape.fullmatch("alex..smith@example.com") is not None # false positivefullmatch requires the complete input to match. Decide separately whether surrounding whitespace should be trimmed. The false-positive assertion is deliberate: it demonstrates why a passing test against this pattern is not a complete syntax verdict.
A pattern that works for a handful of examples has not demonstrated universal coverage. Do not attach an accuracy percentage without a defined dataset and reproducible evaluation. Keep test cases with the code so later changes cannot silently narrow accepted customer addresses.
A syntactically acceptable string may refer to a retired mailbox, a temporary address or an accept-all domain. Conversely, rejecting a string with an overly restrictive expression can exclude a legitimate user. No adjustment to a text pattern can establish current domain routing or the identity of a reader.
Use Python validation or Node.js validation for implementation, and the limits of syntax checking for the evidence and decision model. For sending outcomes, distinguish permanent and temporary failures.
Explore the related Email Awesome workflow and review its current setup before implementing it.
Check the most Frequently Asked Questions
What is regex email validation?
Regex (Regular Expression) email validation is the process of using a sequence of characters to define a search pattern. It checks if the text inputted by a user matches standard email formatting rules (e.g., containing an "@" symbol and a valid Top-Level Domain).
What is the standard regex pattern for validating an email?
There is no universal regex that proves an email address is usable. HTML defines email-input validation behavior, while RFC email syntax covers a different scope. Use native form validation or a maintained parser, and document any custom pattern's limitations instead of presenting it as a complete verification method.
Can regex check if an email actually exists?
No. Regular expressions only verify the string's syntax. They cannot connect to the internet to check if the domain is registered, if the mail server is active, or if the specific user's inbox is full.
Why is my regex blocking valid email addresses?
Overly strict custom regex patterns often fail to account for newer Top-Level Domains (like .app or .tech) or special characters (like + tags) that are fully permitted by standard email protocols.
Is the HTML5 input type="email" better than writing custom regex?
A native email input provides useful browser-level formatting feedback. It does not prove that a mailbox exists, and client-side checks can be bypassed. Validate again on the server and decide explicitly which address forms the application supports.