Email Excluding Free Providers
intermediateMatches email addresses while excluding common free email providers like Gmail and Yahoo.
emailvalidationbusinesslookahead
Pattern
/[\w.+-]+@(?!(?:gmail|yahoo|hotmail|outlook|aol)\.)[\w-]+\.[a-zA-Z]{2,}/giTry It
0 of 5 strings matched
Explanation
Uses a negative lookahead after the @ to reject emails from common free providers (gmail, yahoo, hotmail, outlook, aol). Only business or custom domain emails pass.
Test Strings
Matching
- ceo@company.com
- dev@startup.io
Non-matching
- user@gmail.com
- person@yahoo.com
- someone@hotmail.com
Language Compatibility
| Language | Support |
|---|---|
| JS | Full support |
| PYTHON | Full support |
| JAVA | Full support |
| PHP | Full support |
| GO | Not supported (RE2 engine) |
Code Snippets
const regex = /[\w.+-]+@(?!(?:gmail|yahoo|hotmail|outlook|aol)\.)[\w-]+\.[a-zA-Z]{2,}/gi;
const text = "your text here";
const matches = text.match(regex);
console.log(matches);Common Variations
Extended block list
[\w.+-]+@(?!(?:gmail|yahoo|hotmail|outlook|aol|protonmail|icloud)\.)[\w-]+\.[a-zA-Z]{2,}Also blocks protonmail and icloud