Tagged Fiddles
- 2RevisionsForks
[Validate] Email Address
/^([a-zA-Z0-9_\-.]+)@([a-zA-Z0-9_\-.]+)\.([a-zA-Z]{2,5})$/gi#+ These are all valid email addresses test123@example.com test-123@example-test.com test.123@example.com Test@Example.com - 1RevisionsForks
5bce6b1575622d71b85d0000
/^\s*[ -~]+@\w+[\w\.-]*\.\w{2,4}\s*$/utest-0101@spcom.co.jp - 7RevisionsForks
email validation
/^[a-zA-Z0-9\+\.\_\%\-]{1,256}\@[a-zA-Z0-9][a-zA-Z0-9\-\.]{0,64}(\.[a-zA-Z0-9][a-zA-Z0-9\-]{0,25})$/gmemail address checkingfoo@gmail.com iwassayingbooourns@simpsons.com valid+email@gmail.com email@mail1.com bridezilla@theknot.weddings hangry_hungry_hippo@newmail.budapest testmail@us.ibm.com invalid@email invalid#@email.com email_address@invalid#domain.com should_be_invalid_but_works_because_regexp_sucks@gmail..com domain_too_dots@mail.mycompany.com - 1Revisions2Forks
Simple Email Address
/([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})/giMatches basic email addresses.testemail@gmail.com testemail@hotmail.com a@b.co //doesn't match a@be.co - 1Revisions0Forks
Simple Email Address
/([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})/giMatches basic email addresses.testemail@gmail.com testemail@hotmail.com a@b.co //doesn't match a@be.co - 1Revisions1Forks
Simple Email Address
/([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})/giMatches basic email addresses.The user "GUIDI ALBERTO" <AGuidi@comune.brescia.it> (Aguidi) - 1Revisions5Forks
Simple Email Regex
/\b[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})\b/iEmails are crazy. There's a 'proper' regex at the link below, but at 23 kB you may want to try something simpler, and know which addresses aren't matched. http://code.iamcal.com/php/rfc822/full_regexp.txt#+ Valid email adresses: (wiki:Email_address#Valid_email_addresses) niceandsimple@example.com very.common@example.com a.little.lengthy.but.fine@dept.example.com disposable.style.email.with+symbol@example.com user@[2001:db8:1ff::a0b:dbd0] user@[IPv6:2001:db8:1ff::a0b:dbd0] "much.more unusual"@example.com "very.unusual.@.unusual.com"@example.com "very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com 0@a postbox@com (top-level domains are valid hostnames) !#$%&'*+-/=?^_`{}|~@example.org "()<>[]:,;@\\\"!#$%&'*+-/=?^_`{}| ~ ? ^_`{}|~.a"@example.org ""@example.org #- Invalid email addresses: (wiki:Email_address#Invalid_email_addresses) Abc.example.com # an @ character must separate the local and domain parts Abc.@example.com # character dot(.) is last in local part Abc..123@example.com # character dot(.) is double A@b@c@example.com # only one @ is allowed outside quotation marks a"b(c)d,e:f;g<h>i[j\k]l@example.com # none of the special characters in this local part is allowed outside quotation marks just"not"right@example.com # quoted strings must be dot separated, or the only element making up the local-part this is"not\allowed@example.com # spaces, quotes, and backslashes may only exist when within quoted strings and preceded by a slash this\ still\"not\\allowed@example.com # even if escaped (preceded by a backslash), spaces, quotes, and backslashes must still be contained by quotes - 1Revisions4Forks
Simple Email Regex
/\b[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})\b/iEmails are crazy. There's a 'proper' regex at the link below, but at 23 kB you may want to try something simpler, and know which addresses aren't matched. http://code.iamcal.com/php/rfc822/full_regexp.txt#+ Valid email adresses: (wiki:Email_address#Valid_email_addresses) niceandsimple@example.com very.common@example.com a.little.lengthy.but.fine@dept.example.com disposable.style.email.with+symbol@example.com user@[IPv6:2001:db8:1ff::a0b:dbd0] "much.more unusual"@example.com "very.unusual.@.unusual.com"@example.com "very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com 0@a postbox@com (top-level domains are valid hostnames) !#$%&'*+-/=?^_`{}|~@example.org "()<>[]:,;@\\\"!#$%&'*+-/=?^_`{}| ~ ? ^_`{}|~.a"@example.org ""@example.org #- Invalid email addresses: (wiki:Email_address#Invalid_email_addresses) Abc.example.com # an @ character must separate the local and domain parts Abc.@example.com # character dot(.) is last in local part Abc..123@example.com # character dot(.) is double A@b@c@example.com # only one @ is allowed outside quotation marks a"b(c)d,e:f;g<h>i[j\k]l@example.com # none of the special characters in this local part is allowed outside quotation marks just"not"right@example.com # quoted strings must be dot separated, or the only element making up the local-part this is"not\allowed@example.com # spaces, quotes, and backslashes may only exist when within quoted strings and preceded by a slash this\ still\"not\\allowed@example.com # even if escaped (preceded by a backslash), spaces, quotes, and backslashes must still be contained by quotes - 1Revisions13Forks
534892f475622d7a63b60400
/[0-9a-z_\-]+@[0-9a-z\-]+\.[a-z]{2,5}/g#+ user@example.com #- user@localhost - 1Revisions3Forks
534892f475622d7a63b50400
/[0-9a-z_\-]+@[0-9a-z\-]+\.[a-z]{2,5}/g#+ us+er@example.com #- user@localhost - 1Revisions10Forks
534892f475622d7a63af0400
/[0-9a-z_\-]+@[0-9a-z\-]+\.[a-z]{2,5}/g#+ user@example.com #- user@localhost - 1Revisions9Forks
534892f475622d7a63ad0400
/[0-9a-z_\-+]+@[0-9a-z\-]+\.[a-z]{2,5}/g#+ us+er@example.com #- user@localhost - 1Revisions9Forks
534892f475622d7a63aa0400
/[0-9a-z_\-]+@[0-9a-z\-]+\.[a-z],5}/#+ The user "GUIDI ALBERTO" <AGuidi@comune.brescia.it> (Aguidi) #- user@localhost - 1Revisions8Forks
534892f475622d7a63a70400
/[0-9a-z_\-]+@[0-9a-z\-]+\.[a-z]{2,5}/g#+ user@example.com user@locaost.mx asdasd@asd3r2.adfsf - 1Revisions14Forks
Email - Forgiving
.+@.+\..+Flexible pattern for matching e-mail addresses associated with a domain. While not matching the RFC2822, it does follow the principle of not being a "validation nazi". http://haacked.com/archive/2007/08/26/dont-be-a-validation-nazi.aspx#+ Match these dagilleland@shaw.ca m@m.m my@email..com #- Don't match these bob @home @ m@m - 1Revisions12Forks
Email - Forgiving
/.+@.+\../Flexible pattern for matching e-mail addresses associated with a domain. While not matching the RFC2822, it does follow the principle of not being a "validation nazi". http://haacked.com/archive/2007/08/26/dont-be-a-validation-nazi.aspx#+ Match these dagilleland@shaw.ca m@m.m #- Don't match these bob @home @ m@m - 1Revisions12Forks
Email - Forgiving
(.@.+\...)Flexible pattern for matching e-mail addresses associated with a domain. While not matching the RFC2822, it does follow the principle of not being a "validation nazi". http://haacked.com/archive/2007/08/26/dont-be-a-validation-nazi.aspxThe user "GUIDI ALBERTO" <AGuidi@comune.brescia.it> (Aguidi) - 1Revisions16Forks
Email - Forgiving
/.+@.+\..+/gFlexible pattern for matching e-mail addresses associated with a domain. While not matching the RFC2822, it does follow the principle of not being a "validation nazi". http://haacked.com/archive/2007/08/26/dont-be-a-validation-nazi.aspx#+ Match these dagilleland@shaw.ca m@m.m #- Don't match these bob @home @ m@m