|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2008 Posts: 203 Points: 621 Location: California, USA
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:^[\w-]+(\.[\w-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*?\.[a-z]{2,6}|(\d{1,3}\.){3}\d{1,3})(:\d{4})?$ DescriptionMatches a valid email address including ip's which are rarely used. Allows for a-z0-9_.- in the username, but not ending in a full stop i.e user.@domain.com is invalid and a-z0-9- as the optional sub domain  with domain name and a 2-7 char (a-z) tld allowing for short tld's like ca and new ones like museum. Matchesusername@domain.com | u-s_e.r1@s-ub2.domain-name.museum:8080 | user_name@123.123.123.12Non-Matchesuser@domain | user@domain.c | user.@domain.com Author: nick bennett
|
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2008 Posts: 203 Points: 621 Location: California, USA
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:^[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9]@[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9][\.][a-z0-9]{2,4}$ Description for validate a email, but with this regex it 's possible : a._-z@a_.....____---.com Matches az@er.tr | a_zer-ty@az.er.ty | 123-456_789.0@1.2.3iuyt.azerNon-Matches a@a.a | a.@_1.com | azerty_@domain-com Author Laurent J
|
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2008 Posts: 203 Points: 621 Location: California, USA
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$ Description regex to validate email address noteworthy: (1) It allows usernames with 1 or 2 alphanum characters, or 3+ chars can have -._ in the middle. username may NOT start/end with -._ or any other non alphanumeric character. (2) It allows heirarchical domain names (e.g. me@really.big.com). Similar -._ placement rules there. (3) It allows 2-9 character alphabetic-only TLDs (that oughta cover museum and adnauseum :>). (4) No IP email addresses though -- I wouldn't Want to accept that kind of address. Matches e@eee.com | eee@e-e.com | eee@ee.eee.museumNon-Matches .@eee.com | eee@e-.com | eee@ee.eee.eeeeeeeeeeAuthor Rob Eberhardt
|
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2008 Posts: 203 Points: 621 Location: California, USA
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$ Description Email validator that adheres directly to the specification for email address naming. It allows for everything from ipaddress and country-code domains, to very rare characters in the username. Matches asmith@mactec.com | foo12@foo.edu | bob.smith@foo.tvNon-Matches joe | @foo.com | a@a Author Andy Smith
|
|
|
Rank: Advanced Member Groups: Member
Joined: 11/9/2007 Posts: 560 Points: 1,011 Location: GB
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:[\w-]+@([\w-]+\.)+[\w-]+ Description Yet another simple email validator expression. Matches joe@aol.com | a@b.cNon-Matches asdf | 1234 Author Steven Smith
|
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2008 Posts: 203 Points: 621 Location: California, USA
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular Expression:Code:^((?:(?:(?:[a-zA-Z0-9][\.\-\+_]?)*)[a-zA-Z0-9])+)\@((?:(?:(?:[a-zA-Z0-9][\.\-_]?){0,62})[a-zA-Z0-9])+)\.([a-zA-Z0-9]{2,6})$ Description Captures Submatches, problem:domainname length can be longer than 64 chars, because every [a-zA-Z0-9][\.\-_] is only countet as one char. Matches abc@def.gh | a+b_c@d-e_f.gh | abc@def.ghijklNon-Matches __@__.__ | -a-@-b-.cd | a--b@c__d.ef Author Sebastian Hiller
|
|
|
Rank: Advanced Member Groups: Member
Joined: 6/9/2008 Posts: 203 Points: 621 Location: California, USA
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$ Description regex to validate email address noteworthy: (1) It allows usernames with 1 or 2 alphanum characters, or 3+ chars can have -._ in the middle. username may NOT start/end with -._ or any other non alphanumeric character. (2) It allows heirarchical domain names (e.g. me@really.big.com). Similar -._ placement rules there. (3) It allows 2-9 character alphabetic-only TLDs (that oughta cover museum and adnauseum :>). (4) No IP email addresses though -- I wouldn't Want to accept that kind of address. Matches e@eee.com | eee@e-e.com | eee@ee.eee.museumNon-Matches .@eee.com | eee@e-.com | eee@ee.eee.eeeeeeeeeeAuthor Rob Eberhardt
|
|
|
Rank: Advanced Member Groups: Member
Joined: 11/9/2007 Posts: 560 Points: 1,011 Location: GB
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:^((?:(?:(?:\w[\.\-\+]?)*)\w)+)\@((?:(?:(?:\w[\.\-\+]?){0,62})\w)+)\.(\w{2,6})$ Description Not a 100% email validation. It doesn't work with IP-Adresses, but it's good for most common cases. At least I hope so. Matches a-b-c@d-e-f.com | a@b.ce | Me@my.museumNon-Matches abc@def.g | a--b@c--d.fe | -abc@-def-.def Author Sebastian Hiller
|
|
|
Rank: Advanced Member Groups: Member
Joined: 11/9/2007 Posts: 560 Points: 1,011 Location: GB
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryRegular ExpressionCode:\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$|^([0-9a-zA-Z'\.]{3,40})\*|([0-9a-zA-Z'\.]+)@([0-9a-zA-Z']+)\.([0-9a-zA-Z']+)$|([0-9a-zA-Z'\.]+)@([0-9a-zA-Z']+)\*+$|^$ Description This regular expression is for admitting wild card searches on Emails the wild card character is * and in my case will only allow to do the search when the * is place after the first 3 alphanumeric characters. If you need to modify this behavior change the {3,40} to {n,m} where n is how many characters before the * and m is the total number if characters. Matches jdh* | jss.js* | juan.sk@micro.comNon-Matches j* | js* Author Julio de la Yncera
|
|
|
Rank: Advanced Member Groups: Member
Joined: 9/6/2008 Posts: 227 Points: 487 Location: US
|
Email Validation Regular Expression - Ultimate Regular Expression LibraryI hope this source will help you for email validation. http://www.ipaddresslocation.org/email_lookup/check-email.php Test Management
|
|
|
|
Guest |