Follow Fantora on Twitter
Fantora Word of Classified Ads and Community Forum
Welcome Guest Search | Active Topics | Members | Log In | Register

Email Validation Regular Expression - Ultimate Regular Expression Library

Options
richard
Posted: Friday, July 22, 2011 10:59:09 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2008
Posts: 203
Points: 621
Location: California, USA

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
^[\w-]+(\.[\w-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)*?\.[a-z]{2,6}|(\d{1,3}\.){3}\d{1,3})(:\d{4})?$


Description
Matches 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 domainSrcastic with domain name and a 2-7 char (a-z) tld allowing for short tld's like ca and new ones like museum.

Matches
username@domain.com | u-s_e.r1@s-ub2.domain-name.museum:8080 | user_name@123.123.123.12

Non-Matches
user@domain | user@domain.c | user.@domain.com

Author: nick bennett
richard
Posted: Friday, July 22, 2011 11:03:16 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2008
Posts: 203
Points: 621
Location: California, USA

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
^[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.azer

Non-Matches
a@a.a | a.@_1.com | azerty_@domain-com


Author Laurent J
richard
Posted: Friday, July 22, 2011 11:05:43 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2008
Posts: 203
Points: 621
Location: California, USA

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
^([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.museum

Non-Matches
.@eee.com | eee@e-.com | eee@ee.eee.eeeeeeeeee

Author Rob Eberhardt
richard
Posted: Friday, July 22, 2011 11:09:31 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2008
Posts: 203
Points: 621
Location: California, USA

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
^([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.tv

Non-Matches
joe | @foo.com | a@a


Author Andy Smith
ca4nul
Posted: Sunday, July 24, 2011 5:36:28 AM
Rank: Advanced Member
Groups: Member

Joined: 11/9/2007
Posts: 560
Points: 1,011
Location: GB

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
[\w-]+@([\w-]+\.)+[\w-]+


Description
Yet another simple email validator expression.

Matches
joe@aol.com | a@b.c

Non-Matches
asdf | 1234


Author Steven Smith
richard
Posted: Monday, July 25, 2011 4:15:17 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2008
Posts: 203
Points: 621
Location: California, USA

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular 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.ghijkl

Non-Matches
__@__.__ | -a-@-b-.cd | a--b@c__d.ef

Author Sebastian Hiller
richard
Posted: Tuesday, July 26, 2011 4:54:28 AM
Rank: Advanced Member
Groups: Member

Joined: 6/9/2008
Posts: 203
Points: 621
Location: California, USA

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
^([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.museum

Non-Matches
.@eee.com | eee@e-.com | eee@ee.eee.eeeeeeeeee

Author Rob Eberhardt
ca4nul
Posted: Friday, July 29, 2011 11:39:50 AM
Rank: Advanced Member
Groups: Member

Joined: 11/9/2007
Posts: 560
Points: 1,011
Location: GB

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
^((?:(?:(?:\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.museum

Non-Matches
abc@def.g | a--b@c--d.fe | -abc@-def-.def

Author Sebastian Hiller
ca4nul
Posted: Monday, August 01, 2011 5:01:24 AM
Rank: Advanced Member
Groups: Member

Joined: 11/9/2007
Posts: 560
Points: 1,011
Location: GB

Email Validation Regular Expression - Ultimate Regular Expression Library

Regular Expression
Code:
\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.com

Non-Matches
j* | js*

Author Julio de la Yncera
hightech
Posted: Tuesday, August 30, 2011 1:13:04 AM
Rank: Advanced Member
Groups: Member

Joined: 9/6/2008
Posts: 227
Points: 487
Location: US

Email Validation Regular Expression - Ultimate Regular Expression Library

I hope this source will help you for email validation.
http://www.ipaddresslocation.org/email_lookup/check-email.php

Test Management
Users browsing this topic
Guest

 Related
Ultimate Regular Expression Library
blue Dots apearing for spaces in the pages
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding
Commerce server 2009 Basket Only Extension
run CS 2007 code on 2009 R2. Where is Microsoft.CommerceServer.Runtime
Error in Unpacking Data warehouse : Cannot connect to Analysis Services version '10.0.4000.0'
Is it possible to do CatalogSearch without any sort property?
using named Instance of sql server in Commerce Server 2009 Datawarehouse
how to Call web service through HTTP
The module 'CommerceProfileModule' depends on the site resource 'Biz Data Service' which does not exist in the Commerce Server a
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Fantora Blog | Discount Shop UK | Discount Shop USA | Discount Shop Canada | Discount Boutique France | Discount Shop Deutschland | Discount Shop Italia | Descuento Shop España

Free Classified ads, Webmaster Forum & Technology Reviews | Fantora Free Classified Ads | Buy & Sell Electronics, Mobile phones & Accessories | fantora Forums Community | Buy & Sell DVD, Games and Consols | Free eBooks & Softwares | SEO & Affiliate Marketing Discussion | Programming Language Forum (.NET, ASP, PHP, SQL) | Free Classified Ads | General Stuff (Movies, Chat, Comics) | Free Online English Movies & Reviews | Free Online Hindi Movies & Reviews | Australia & New Zealand Immigration Forum | Europe immigration forum | Canada Immigration Forum | Ireland Immigration Forum | US Immigration Forum | United Kingdom Immigration Forum

Main Forum RSS : RSS

Powered by: YAF.NET
Copyright © AI Logica All rights reserved.
This page was generated in 0.395 seconds.