Last active
November 9, 2023 04:21
-
-
Save markhowellsmead/48f4f62acd7f75afaceaffab430c0345 to your computer and use it in GitHub Desktop.
Regex for valid email address excluding specific free domains, like Gmail, GMX and Yahoo. Extend the list of domains according to your own requirements.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
^([\w.-]+)@(\[(\d{1,3}\.){3}|(?!hotmail|gmail|googlemail|yahoo|gmx|ymail|outlook|bluewin|protonmail|t\-online|web\.|online\.|aol\.|live\.)(([a-zA-Z\d-]+\.)+))([a-zA-Z]{2,4}|\d{1,3})(\]?)$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
.net What you have hear "^([\w.-]+)@([(\d{1,3}.){3}|(?!hotmail|gmail|googlemail|yahoo|gmx|ymail|outlook|bluewin|protonmail|t-online|web.|online.|aol.|live.)(([a-zA-Z\d-]+.)+))([a-zA-Z]{2,4}|\d{1,3})(]?)$" works well with exception of case sensitivity. gMail, oUtlook etc. Thank you