Last active
August 14, 2023 04:45
-
-
Save toledorobia/25ef67b3793b2edac3eb to your computer and use it in GitHub Desktop.
MySQL - Validate email
This file contains hidden or 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
SELECT * | |
FROM user | |
WHERE email NOT REGEXP '^[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9_\-]@[a-zA-Z0-9][a-zA-Z0-9._-]*[a-zA-Z0-9]\.[a-zA-Z]{2,4}$' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Saludos!
Gracias por este gist, pero creo que ya no soporta los nuevos TLD.
Que te parece este? Solo cambie la longitud del ultimo a +