RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^([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
Non-Matches
joe | @foo.com | a@a
Author Rating: The rating for this expression. Andy Smith
Source Todd Moon
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Power CBD Gummies rviews - Get Expedient, Straightforward Power CBD Gummies Fat Consuming!
Name: Power CBD Gummies rviews - Get Expedient, Straightforward Power CBD Gummies Fat Consuming!
Date: 4/7/2023 9:21:54 AM
Comment:
Power CBD Gummies The greater part of the examination on the advantages of CBD has been centered around its possible use as a therapy for specific ailments. Official web: https://www.outlookindia.com/outlook-spotlight/power-cbd-gummies-new-details-emerge-safe-ingredients-or-side-effects--news-274734


Title: Algarve Keto Gummies {Updated 2023} - Is It Another Scam Or Not?
Name: Algarve Keto Gummies {Updated 2023} - Is It Another Scam Or Not?
Date: 2/18/2023 7:39:19 AM
Comment:
Algarve Keto Gummies The dietary enhancement contains solid fixings that are handpicked and professed to help decreasing fat rate in body and accomplish the ideal weight reduction brings about constant. https://www.outlookindia.com/outlook-spotlight/algarve-keto-gummies-reviews-scam-alerts-is-it-really-work-news-256607


Title: Algarve Keto Gummies :- It Legit and Safe To Use? Algarve Keto Gummies :- Alarming Algarve Keto Gummies Scam or Safe?
Name: JfrazLbvous
Date: 2/18/2023 5:44:39 AM
Comment:
Algarve Keto Gummies-:If you reduce your carbohydrate consumption, your body will use fats for power. The ketogenic diet has come to be well-known for its effectiveness due to its capability to speed up the body's metabolic rate and, for that reason, the pace at which fats is burned. Many people turn to it when they need a safe and effective manner to shed kilos quick. All ketogenic nutritional supplements, including keto gummies, comply with the same primary method. outlookindia.com/outlook-spotlight/algarve-keto-gummies-reviews-scam-alerts-is-it-really-work-news-256607


Title: https://keto-clean-gummies-ca-canada.jimdosite.com/
Name: BolitnDcirsy
Date: 2/16/2023 10:09:16 AM
Comment:
Keto Clean Gummies Canada-: You don't should be worried about facet effects because the keto supplement is constructed from herbal and secure components. Make sure you do not boom the dosage at all. You won't revel in any negative aspect outcomes from taking those keto gummies if you observe the dose instructions provided by the producer. This product's endorsed dosage is two tablets two times each day, without or with water. But, if essential, water may be used to finish it off. outlookindia.com/outlook-spotlight/keto-clean-gummies-canada-ca-untold-hidden-truth-is-it-scam-or-legit-news-262165


Title: Keto Clean Gummies Canada – Cheap Scam or Effective Healthy Life?
Name: Keto Clean Gummies Canada – Cheap Scam or Effective Healthy Life?
Date: 2/16/2023 9:25:34 AM
Comment:
Keto Clean Gummies Canada The keto diet has been known as a therapeutic diet for nearly a decade, but as a rapid weight loss formula, it is a completely new concept in the nutritionist industry. It has won people's hearts by providing them with an absolute result that allows them to live healthier life free of unwanted fat and the risk of fatal diseases. It is a quick fix for the body and overall health. Official web -https://www.outlookindia.com/outlook-spotlight/keto-clean-gummies-canada-ca-untold-hidden-truth-is-it-scam-or-legit-news-262165


Title: Keto Clean Gummies Canada – Legit keto Now Healthy Life Relief or Scam?
Name: Keto Clean Gummies Canada – Legit keto Now Healthy Life Relief or Scam?
Date: 2/16/2023 9:19:25 AM
Comment:
Keto Clean Gummies Canada The keto diet has been known as a therapeutic diet for nearly a decade, but as a rapid weight loss formula, it is a completely new concept in the nutritionist industry. It has won people's hearts by providing them with an absolute result that allows them to live healthier life free of unwanted fat and the risk of fatal diseases. It is a quick fix for the body and overall health. Official web -https://www.outlookindia.com/outlook-spotlight/keto-clean-gummies-canada-ca-untold-hidden-truth-is-it-scam-or-legit-news-262165


Title: Keto Clean Gummies Canada -(Works Or Hoax) Check Here All Improtant Details!Healthy life
Name: Keto Clean Gummies Canada
Date: 2/15/2023 10:35:41 AM
Comment:
Keto Clean Gummies Canada It is critical to ensure that you are getting enough nutrients in your diet. Keto Clean Gummies will assist you in doing so by providing you with all of the nutrients you require to maintain healthy skin, hair, and nails. Keto Clean Gummies are an excellent choice if you want a weight loss supplement that will not leave you feeling jittery or weak. Official web -https://www.outlookindia.com/outlook-spotlight/keto-clean-gummies-canada-ca-untold-hidden-truth-is-it-scam-or-legit-news-262165


Title: Keto Clean Gummies Canada -(Works Or Hoax) Check Here All Improtant Details!Healthy life
Name: Keto Clean Gummies Canada
Date: 2/15/2023 10:34:57 AM
Comment:
Keto Clean Gummies Canada It is critical to ensure that you are getting enough nutrients in your diet. Keto Clean Gummies will assist you in doing so by providing you with all of the nutrients you require to maintain healthy skin, hair, and nails. Keto Clean Gummies are an excellent choice if you want a weight loss supplement that will not leave you feeling jittery or weak. Official web -https://www.outlookindia.com/outlook-spotlight/keto-clean-gummies-canada-ca-untold-hidden-truth-is-it-scam-or-legit-news-262165


Title: Where to Get Keto Blast Gummies Canada ?
Name: Does Keto Blast Gummies Canada helping for Weight loss
Date: 8/12/2022 10:53:26 AM
Comment:
You can get thinner and improve your metabolic rate by utilizing a keto pill that advances ketosis. It contains BHB salts, which assist the body with delivering more ketones and put you into ketosis. This implies that the muscle versus fat's cells are utilized as a wellspring of energy while following a low-sugar diet.Keto Blast Gummies Canada https://www.outlookindia.com/outlook-spotlight/keto-blast-gummies-canada-usa-official-website-read-ingredients-before-use--news-215881


Title: Optimum Keto Reviews – Is weight loss Scam or Legit?
Name: Optimum Keto Reviews
Date: 4/15/2022 10:58:04 AM
Comment:
Keeping a food journal: By keeping track of what that they consume throughout the day, a person can often identify any foods or eating patterns — such as snacking — that may be preventing weight loss. Drinking plenty of water: Drinking plenty of water helps fill the stomach, and this may help keep a person from overeating or snacking too much throughout the day.Optimum Keto https://www.jpost.com/promocontent/optimum-keto-reviews-scam-exposed-2022-are-they-pills-legitimate-or-scam-703842 https://lexcliq.com/optimum-keto-reviews-is-weight-loss-scam-or-legit/ https://www.scoop.it/topic/secotrgoaf https://maptia.com/secotrgoket https://www.facebook.com/Optimum-Keto-102201742411222/ https://www.facebook.com/Optimum-Keto-Reviews-112359424623289/


Title: What are Natures Only CBD Gummies?
Name: What is the best way to use Natures Only CBD Gummies?
Date: 4/14/2022 9:35:11 AM
Comment:
Natures Only CBD Gummies https://www.hometownstation.com/news-articles/natures-only-cbd-gummies-reviews-is-it-fake-or-trusted-412557 https://www.scoop.it/topic/natures-only-cbd-gummies-by-reberroold-cutr https://lexcliq.com/natures-only-cbd-gummies-more-effective-for-pain-relief/ https://techplanet.today/post/natures-only-cbd-gummies-reviews-is-gummies-scam-or-legit


Title: Strange top-level domain limits
Name: Denis
Date: 7/16/2020 3:36:58 PM
Comment:
Strangely enough, I see this limitation quite often, but... There are top-level domains that are longer than 3 letters. Why they are restricted? There is, for example, a domain called "university", and we are able to use it as our top-level domain name. And this is not the only domain of that length...


Title: Strange top-level domain limits
Name: Denis
Date: 7/16/2020 3:36:35 PM
Comment:
Strangely enough, I see this limitation quite often, but... There are top-level domains that are longer than 3 letters. Why they are restricted? There is, for example, a domain called "university", and we are able to use it as our top-level domain name. And this is not the only domain of that length...


Title: Modified
Name: Tayyab Asghar
Date: 3/29/2020 6:37:22 PM
Comment:
[email protected] Was valid. Like Michael Israel I am also not sure there is a domain that contains digits so I modified it ^([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})(\]?)$


Title: Modified
Name: Tayyab Asghar
Date: 3/29/2020 6:23:05 PM
Comment:
[email protected] Was valid. Like Michael Israel I am also not sure there is a domain that contains digits so I modified it ^([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})(\]?)$


Title: Modified
Name: Tayyab Asghar
Date: 3/29/2020 5:59:54 PM
Comment:
[email protected] Was valid. Like Michael Israel I am also not sure there is a domain that contains digits so I modified it ^([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})(\]?)$


Title: Modified
Name: Tayyab Asghar
Date: 3/29/2020 5:59:51 PM
Comment:
[email protected] Was valid. Like Michael Israel I am also not sure there is a domain that contains digits so I modified it ^([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})(\]?)$


Title: OK but beeds some enhancements.
Name: Michael Israel
Date: 3/29/2020 7:46:32 AM
Comment:
IP addresses are not correctly checked (534.32.654.789 is allowed here). Also from looking at it, something like "[email protected]" is also accepted. Not sure if gmail.234 is a valid domain name.


Title: worked for me
Name: Hannan
Date: 7/11/2019 4:49:30 AM
Comment:
Thanks man. I had been searching for this for long.


Title: worked for me
Name: Hannan
Date: 7/11/2019 4:49:19 AM
Comment:
Thanks man. I had been searching for this for long.


Title: Works Flawlessly!
Name: sp0ckrates
Date: 6/14/2019 5:34:15 PM
Comment:
Best one I've found, yet!


Title: ^(?!0+$)[0-9]{18}
Name: Smith
Date: 11/24/2017 12:20:29 PM
Comment:
im using this pattren for 18 digits but during validation its goes out of the range. ow to fix it?


Title: regular expression
Name: regex
Date: 10/27/2017 9:35:58 AM
Comment:
give expression for 10 digits mobile number


Title: regular expression
Name: regex
Date: 10/27/2017 9:35:09 AM
Comment:
give expression for 10 digits mobile number


Title: dr
Name: daniel-john
Date: 9/12/2017 9:07:25 PM
Comment:
hello w0rld!


Title: Ismail
Name: Rahmouni
Date: 6/5/2017 12:04:33 AM
Comment:
@[ismail Rahmouni:]


Title: mail
Name: prithvi
Date: 2/28/2017 8:31:09 AM
Comment:
can you tell me regular expression for mail. only accpt gmail.com and gmail56.com.com dont accpt this


Title: mail
Name: prithvi
Date: 2/28/2017 7:56:38 AM
Comment:
can you tell me regular expression for mail. only accpt gmail.com and gmail56.com.com dont accpt this


Title: Fails to match TLDs with more than 4 characters (e.g. ".church")
Name: RegexTester
Date: 3/14/2016 11:01:33 AM
Comment:
This expression is outdated and arbitrarily limits top-level domains to 4 characters or less.


Title: 12
Name: 12
Date: 3/11/2016 12:44:22 AM
Comment:
121212


Title: 12
Name: 12
Date: 3/11/2016 12:44:21 AM
Comment:
121212


Title: Review
Name: Welington
Date: 2/16/2015 7:37:19 AM
Comment:
Don't works with [email protected] or [email protected]


Title: Review
Name: Welington
Date: 2/16/2015 7:36:05 AM
Comment:
Don't works with [email protected] or [email protected]


Title: What is meaaning of $ sign
Name: Goti
Date: 1/2/2015 1:24:11 AM
Comment:
Hi, I am beginer in regular expression so i down know the exact meaning of $ sign as in above expression?


Title: hola
Name: holaa
Date: 10/10/2014 3:16:26 AM
Comment:
josdj_#00000?????&&&**


Title: Regular Expression
Name: Girish
Date: 8/20/2014 12:25:23 AM
Comment:
var expr = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; how it works? please tell detailed explanation


Title: jquery
Name: R@j!
Date: 4/30/2014 7:11:12 AM
Comment:
what is the use of /^[a-zA-Z][ .a-zA-Z]{0,60}$/i? can you tell me the usage..


Title: jquery
Name: R@j!
Date: 4/30/2014 6:37:49 AM
Comment:
what is the use of /^[a-zA-Z][ .a-zA-Z]{0,60}$/i? can you tell me the usage..


Title: jquery
Name: R@j!
Date: 4/30/2014 6:37:25 AM
Comment:
what is the use of /^[a-zA-Z][ .a-zA-Z]{0,60}$/i? can you tell me the usage..


Title: put o
Name: put o
Date: 2/21/2014 12:00:36 AM
Comment:
put o


Title: @@[0:[0:9: yolo]]
Name: @@[0:[0:9: yolo]]
Date: 12/2/2013 3:32:29 PM
Comment:
@@[0:[0:9: yolo again]]


Title: @@[0:[0:9: yolo]]
Name: @@[0:[0:9: yolo]]
Date: 12/2/2013 3:32:18 PM
Comment:
@@[0:[0:9: yolo again]]


Title: @@[0:[0:9: yolo]]
Name: @@[0:[0:9: yolo]]
Date: 12/2/2013 3:31:58 PM
Comment:
@@[0:[0:9: yolo again]]


Title: @@[0:[0:9: yolo]]
Name: @@[0:[0:9: yolo]]
Date: 12/2/2013 3:31:34 PM
Comment:
@@[0:[0:9: yolo again]]


Title: Regular Expression
Name: Regular Expression
Date: 7/15/2013 1:46:02 PM
Comment:
%Date:~-4%-%Date:~4,2%-%Date:~7,2%


Title: 1235
Name: loise
Date: 5/30/2013 5:02:04 AM
Comment:
cavxsaadfvgdeviétyrfzzfgzdfftvxdhfeftdfzfyzbg"fbgutegvgfézohfrkzhfjhrghyuan,vtkuttuigircv a cfdtfsdeje gfgrf hfzriu fier irgo frigo et toi c va et toi tu fa q moirien et roi pki tu me demande ca vhdgzf4f3gek3gk4


Title: eee
Name: eeee
Date: 5/3/2013 5:51:21 AM
Comment:
gergrg


Title: wewrwerwerwer
Name: wrewer
Date: 11/7/2012 10:58:23 AM
Comment:
werwerwer


Title: DONT COPY THIS EXAMPLE
Name: Cris
Date: 4/30/2012 7:37:10 PM
Comment:
Doesn't allow "+" in the username - lookup "Plus Addressing"


Title: ghdh
Name: d'souza
Date: 2/21/2012 8:33:21 AM
Comment:
qefrwgwrg


Title: Reg Ex for E-mailadresses
Name: Gust
Date: 8/29/2011 4:54:55 PM
Comment:
This RegEx doesn't work for series of e-mailaddresses that are separated by a ';' or by a ','


Title: Not allowing _ in domain name e.g. a.d@go_mail.com
Name: Amhot
Date: 7/25/2011 7:13:15 AM
Comment:
Not allowing _ in domain name e.g. a.d@go_mail.com


Title: Properly working IPv4 regex validator
Name: Mike
Date: 7/25/2011 1:44:42 AM
Comment:
The following regex will validate an IPv4 address in standard form. It matches 4 and only 4 octets, and each octet must decimal integers within the range of 0-255. Leading zeroes are not permitted in any octet. It has been tested with bash3's regex parser and with GNU egrep: '((25[0-5]|(2[0-4]|1[0-9]|[1-9])?[0-9])\.){3}(25[0-5]|(2[0-4]|1[0-9]|[1-9])?[0-9])' Here is an alternative slightly longer one that I made which works also: '(((1[0-9]|[1-9])?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}((1[0-9]|[1-9])?[0-9]|2([0-4][0-9]|5[0-5]))'


Title: Properly working IPv4 regex validator
Name: Mike
Date: 7/25/2011 1:43:37 AM
Comment:
The following regex will validate an IPv4 address in standard form. It matches 4 and only 4 octets, and each octet must decimal integers within the range of 0-255. Leading zeroes are not permitted in any octet. It has been tested with bash3's regex parser and with GNU egrep: '((25[0-5]|(2[0-4]|1[0-9]|[1-9])?[0-9])\.){3}(25[0-5]|(2[0-4]|1[0-9]|[1-9])?[0-9])' Here is an alternative slightly longer one that I made which works also: '(((1[0-9]|[1-9])?[0-9]|2([0-4][0-9]|5[0-5]))\.){3}((1[0-9]|[1-9])?[0-9]|2([0-4][0-9]|5[0-5]))'


Title: :) this is email [email protected]]
Name: nik
Date: 9/13/2009 9:46:10 AM
Comment:
this is email [email protected]]. Your regex matches [email protected]] :)


Title: :) this is email [email protected]]
Name: nik
Date: 9/13/2009 9:45:23 AM
Comment:
this is email [email protected]]. Your regex matches [email protected]] :)


Title: Does not allow ' in local part of e-mail address (RFC 2822)
Name: hfrmobile.com
Date: 6/6/2008 7:58:00 AM
Comment:
See also (German): http://de.wikipedia.org/wiki/E-Mail-Adresse


Title: Need info for documentation
Name: Bourque, Pascal
Date: 5/13/2005 9:30:46 AM
Comment:
in your pattern i need to know why you put \[ after the @ and (\]?) at the and of your pattern


Title: Colbus - Web Search Results
Name: Miranda
Date: 4/22/2005 9:39:21 AM
Comment:
Another web-search engine - not fast now. but shows interesting sites in result.


Title: Kitchen5
Name: zarina
Date: 4/14/2005 9:03:39 PM
Comment:
If you are searching for a kitchen appliance on the net, use a good sites about cooking, recipes. Lets cooking better! Fun recipes for all!


Title: Ultra Shop
Name: Jaffa
Date: 2/18/2005 11:03:29 PM
Comment:
Nice design


Title: Get Your Win
Name: Stefany
Date: 1/8/2005 6:54:08 PM
Comment:
Nice design :)


Title: Home Theater Systems
Name: Ben
Date: 9/22/2004 2:12:09 AM
Comment:
I ve opened a site about home theater systems. Feel free to visit my site and find a large amount of links and resources related to home theaters.


Title: Do some checking before publishing
Name: this.value
Date: 1/12/2004 6:20:28 PM
Comment:
please folks do testing before you publish anything.


Title: Mr.
Name: Ramakoteswara Rao Atluri
Date: 12/12/2003 5:51:08 AM
Comment:
This regular expression accepts [email protected] also.which is not a valid one.


Title: Re: doesn't seem to work very well
Name: schaaf
Date: 11/29/2003 5:37:52 PM
Comment:
cause this regex is for matching email addresses, not uris, dumbass.


Title: the _ character is legal in any usage in an email
Name: PowerMouse
Date: 11/19/2003 1:32:37 PM
Comment:
fixed: ^([a-zA-Z0-9_\-\.]+)*[a-zA-Z0-9]@[a-zA-Z][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$


Title: the _ character is legal in any usage in an email
Name: michael granovski
Date: 11/19/2003 1:04:34 PM
Comment:
[email protected] - how to eliminate this?


Title: the . character is legal in any usage in an email
Name: Todd Moon
Date: 10/11/2003 1:26:25 PM
Comment:
I wrote this regex years ago after reading some official email syntax paper. The . character is legal anwhere in the user section of an email. thus the folowing are legal emails and someone, somewhere, may have a mail server with such usernames: [email protected] [email protected] Even though I think many mail servers won't allow that kind of address, some may, so I'm being conservative on the off chance that someone comes to my site with such an address. Also, as for validating only IP's in the 255 range. If someone's is technical enough to type in an IP at all, I'm pretty sure they aren't going to mess up their IP. Moreover, if someones going to fool your validator, they are just going to use something like [email protected] not an invalid IP. I wanted to allow numbers but didn't want to spend the time checking for valid numbers. Thanks to those who spent the time.


Title: [email protected] should fail
Name: Don Makoviney
Date: 10/7/2003 8:59:30 AM
Comment:
Well, thats what I meant (but the opposite. . haha). [email protected] will be allowed THROUGH if you use this regular expression in the regularexpressionvalidator. -DM


Title: Seperate DOMAIN and LOCAL-PART
Name: Matthew Blyde
Date: 10/6/2003 10:30:11 PM
Comment:
I'm only just starting to learn regex and struggling to understand all the detail of this example. I'm just wondering if someone could split Ralph Thompsons latest version into two patterns to match the DOMAIN and LOCAL-PART seperatly. That would be much appreciated.


Title: [email protected] should fail
Name: Remi Sabourin
Date: 9/16/2003 7:06:49 PM
Comment:
You cannot have a dot start or end the local-part of an email (part before de @ character) see RFC 2822


Title: [email protected] fails
Name: Don Makoviney
Date: 9/15/2003 9:01:17 AM
Comment:
[email protected] fails with this reg ex.


Title: something.museum IS valid!
Name: Jason Haymer
Date: 9/2/2003 2:35:59 PM
Comment:
Go to: http://index.museum/ which not only proves that the .museum TLD exists, but also lists all .museum domains!


Title: re: Validating multiple email ids
Name: Liam
Date: 7/30/2003 10:36:54 AM
Comment:
Since you have a delimeter just split the string in to an array and validate each address in the array


Title: Re: Validating multiple email ids
Name: blackcow
Date: 7/25/2003 4:18:01 PM
Comment:
Your best bet is to let your parser deal with seperation of the addresses and pass each to regex, otherwise ( if its possible at all with regex only ) you'll have a large expression which will be slow as a very slow thing. Hope this helps


Title: Validating multiple email ids
Name: shokas
Date: 7/25/2003 6:50:26 AM
Comment:
How to validate multiple email address entered into a email text box with a predefined delimeter


Title: something.museum is not a valid domain?
Name: kaj
Date: 7/24/2003 8:04:58 PM
Comment:
no TLDs have more than 4 characters AFAIK, so [email protected] is supposed to fail.


Title: Another lil problem...
Name: i
Date: 7/22/2003 1:02:08 AM
Comment:
[email protected] also fails :(


Title: My Latest Version - Allows Quoted Expressions and IP Addresses
Name: Ralf Thompson
Date: 7/17/2003 11:35:30 PM
Comment:
Typo fix:<br /><br /> ^(("[^"\x0D\\]+")|([^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+(\.[^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+)*))@(((([0-9])|([0-9][0-9])|([0-1][0-9][0-9])|(2[0-4][0-9])|(25[0-5]))(\.(([0-9])|([0-9][0-9])|([0-1][0-9][0-9])|(2[0-4][0-9])|(25[0-5]))){3}))|(([^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+(\.[^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+)*)\.[a-zA-Z]{2,4})$


Title: My Latest Version - Allows Quoted Expressions and IP Addresses Continued (DOMAIN)
Name: Ralf Thompson
Date: 7/17/2003 11:29:41 PM
Comment:
The DOMAIN is an IP Addr or one or more "atoms" separated by dots. I added the constraint if an IP address isn't used there must be at least two "sub domains" the last of which is limited to a string of 2 to 4 letters. An IP Addr is four "octets" separated by dots. An Octet can have a value of 0 to 255 and is expressed as (([0-9])|([0-9][0-9])|([0-1][0-9][0-9])|(2[0-4][0-9])|(25[0-5]))<br /><br /> The full IP is ((([0-9])|([0-9][0-9])|([0-1][0-9][0-9])|(2[0-4][0-9])|(25[0-5]))(\.(([0-9])|([0-9][0-9])|([0-1][0-9][0-9])|(2[0-4][0-9])|(25[0-5]))){3}). The alternate atoms list is ([^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+(\.[^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+)*)\.[a-zA-Z]{2,4}


Title: My Latest Version - Allows Quoted Expressions and IP Addresses Continued (LOCAL PART)
Name: Ralf Thompson
Date: 7/17/2003 11:20:02 PM
Comment:
Above is based on RFC822 (close but not exact). My concept was that an email address follows the pattern LOCAL_PART@DOMAIN. The LOCAL_PART can either be a quoted string ("[^"\x0D\\]") or one or more "atoms" separated by periods. An atom is any char except ASCII 0 to ASCII 31, Space (ASCII 32) or Special Characters ()[]<>.\",;:@ and takes the form [^\x00-\x20\(\)\<\>\[\]\.\\",;:@] in the expression above. The entire LOCAL_PART is therefore shown above as ^(("[^"\x0D\\]+")|([^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+(\.[^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+)*))


Title: My Latest Version - Allows Quoted Expressions and IP Addresses
Name: Ralf Thompson
Date: 7/17/2003 11:07:19 PM
Comment:
^(("[^"\x0D\\]+")|([^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+(\.[^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+)*))@(((([0-9])|([0-9][0-9])|([0-1][0-9][0-9])|(2[0-4][0-9])|(25[0-5]))(\.(([0-9])|([0-9][0-9])|([0-1][0-9][0-9])|(2[0-4][0-9])|(25[0-5]))){3})}|{([^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+(\.[^\x00-\x20\(\)\<\>\[\]\.\\",;:@]+)*)\.[a-zA-Z]{2,4})$


Title: Quoted expressions - continued
Name: Paul Clarke
Date: 7/17/2003 8:04:49 AM
Comment:
expressions such as: "Paul.Clarke'sAddress"@mydomain.com


Title: Quoted expressions
Name: Paul Clarke
Date: 7/17/2003 8:03:24 AM
Comment:
So has anyone come up with an updated version which works with quoted expressions such as:


Title: Long winded consideration
Name: Ralf Thompson
Date: 7/10/2003 11:37:41 PM
Comment:
Per RFC822, an email address matches this pattern: LOCAL-PART @ DOMAIN The definition for LOCAL-PART is: word *("." word) In other words, a pattern of characters delimited by periods. The definition for "word" is either a "quoted-string" or an "atom". A "quoted-string" is pretty much what it sounds like: a pair of double quotes enclosing a text string consisting of zero or more characters. The characters can either be qtext or a quoted-pair. For qtext characters, the only limitations is that they may not be a double quote, a back slash or a CR (ASCII 13). A quoted-pair is "\" followed by any character. An atom on the other hand is any string of zero or more chararacters that is best described by what's disallowed rather that what's permissible. An atom may contain any character except the following: control chars (ASCII 0 to ASCII 31{HEX: x1F}) space char (ASCII 32 {HEX: x20}) any of the following "special" characters: ()<>@,;:\".[]


Title: PERFEKT REGEX
Name: Terror-Hackerz
Date: 7/9/2003 4:03:00 AM
Comment:
"^(25[0-5]{1}|2[0-4]{1}[0-9]{1}|1{0,1}[0-9]{0,1}[0-9]{1}\.{1}){3}(25[0-5]{1}|2[0-4]{1}[0-9]{1}|1{0,1}[0-9]{0,1}[0-9]{1}){1}$" :)


Title: Another Miss for this regex, yes
Name: Myle Arif Ott
Date: 7/3/2003 9:28:53 PM
Comment:
plz go to <a href="http://regexlib.com/RETester.aspx?regexp_id=284">http://regexlib.com/RETester.aspx?regexp_id=284</a> to see MY regex. mine does not have this bug or several others...including IP addresses of (999.999.999.999)


Title: Another Miss
Name: Denis
Date: 7/2/2003 10:29:55 AM
Comment:
"[email protected]" I woul like to reject this kind of emails. how to disable the . before the @ ? Thanks Denis


Title: Another miss?
Name: artur
Date: 7/2/2003 8:43:33 AM
Comment:
Is this a valid email address "[email protected]"? The regexp allows that.


Title: Updated Myle Ott RegEx (corrected for IP ranges) #2
Name: Tek Boy
Date: 6/27/2003 1:11:01 PM
Comment:
^([a-zA-Z0-9_\-\.])+@((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))|((([a-zA-Z0-9\-])+\.)+([a-zA-Z\-])+))$<br><br> IP matching is a good idea, too. Unfortunately, your regular expression does not match 0-255. Example: the number "227" is greater than zero and less than 255, but fails your RegEx because you do not allow numbers greater than 5 in any given position.<br><br> I ran across the following URL when trying to figure out how to do 0-255 in RegEx:<br><br> <a href="http://www.faqts.com/knowledge_base/view.phtml/aid/21284/fid/566">http://www.faqts.com/knowledge_base/view.phtml/aid/21284/fid/566</a><br><br><br> Then I substituted it in place of your manner of checking for 0-255, yielding the RegEx given at the top of my post. That RegEx appears to work. Support for RFC 822 still isn't included, though..... anyb


Title: Updated Myle Ott RegEx (corrected for IP ranges)
Name: Tek Boy
Date: 6/27/2003 1:08:11 PM
Comment:
^([a-zA-Z0-9_\-\.])+@((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))|((([a-zA-Z0-9\-])+\.)+([a-zA-Z\-])+))$ You're right -- IP matching is a good idea, too. Unfortunately, your regular expression does not match 0-255. For example: the number "227" is greater than zero and less than 255, but it is not matched because you do not allow numbers greater than 5 in any given position. I ran across the following URL when trying to figure out how to do 0-255 in RegEx: http://www.faqts.com/knowledge_base/view.phtml/aid/21284/fid/566 Then I substituted it in place of your manner of checking for 0-255, yielding the RegEx given at the top of my post. That RegEx appears to work. Of course, as pinetree mentioned in his/her post (06/16/2003 03:54:07 PM), there are other examples that aren't trapped by your original RegEx o


Title: Adhears to which specification?
Name: pinetree
Date: 6/16/2003 3:54:07 PM
Comment:
Except that per RFC 822 (http://www.w3.org/Protocols/rfc822/Overview.html), the following email addresses are valid but would be trapped as invalid by this code. Specifically, look at Appendix A (http://www.w3.org/Protocols/rfc822/Overview.html#z10), section A.3.3. "Some Silly User"@example.com Another'[email protected] Yet/Another/Wacky/[email protected]


Title: Hotmail Not Valid?
Name: YIRMASTER
Date: 6/14/2003 9:00:26 PM
Comment:
It doesn't accept hotmail address as valid matches example [email protected] doesn't work


Title: Finally, I think it's fixed...I hope
Name: Myle Arif Ott
Date: 4/14/2003 10:36:42 PM
Comment:
I want to thank both you Michele and Ivan R. for some new bug fixes including the [email protected] bug and IP addresses that have 099 or 009 type address parts...<BR><BR><a href="http://regexlib.com/REDetails.aspx?regexp_id=284">http://regexlib.com/REDetails.aspx?regexp_id=284</a>


Title: max length
Name: wayne
Date: 4/14/2003 7:21:49 PM
Comment:
How would I add a max length to this whole expression.... For example, I have a limitation of accepting only 100 characters in length. Thanks


Title: Not perfect
Name: Michele
Date: 4/14/2003 5:19:53 PM
Comment:
This fake email address: [email protected] pass your regexp!


Title: Good To Go
Name: Ryan Shaw
Date: 4/14/2003 4:57:17 PM
Comment:
This is a great Email Regexp, Thanks, I used it on our corporate wide tracking software and Extranet.


Title: Sorry About The "Fixed Version"
Name: Myle Ott
Date: 4/13/2003 8:55:50 PM
Comment:
This is my final version...I made it from scratch:<BR><BR>BTW, Does HTML Work Here???<BR><BR>^([a-zA-Z0-9_\-\.])+@(([0-2]?[0-5]?[0-5]\.[0-2]?[0-5]?[0-5]\.[0-2]?[0-5]?[0-5]\.[0-2]?[0-5]?[0-5])|((([a-zA-Z0-9\-])+\.)+([a-zA-Z\-])+))$


Title: Fixed Version
Name: Myle Ott
Date: 4/13/2003 7:58:09 PM
Comment:
About the 999.999.999.999... I think this change should make it *perfect*: ^([a-zA-Z0-9_\-\.]+)@((\[[0-2]{1}[0-5]{1}[0-5]{1}\.[0-2]{1}[0-5]{1}[0-5]{1}\.[0-2]{1}[0-5]{1}[0-5]{1}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-2]{1}[0-5]{1}[0-5]{1})(\]?)$


Title: p.s.
Name: Ian Ring
Date: 4/4/2003 12:16:48 PM
Comment:
The regex below is also from this site, it validates an ip address in the form 255.255.255.255 -- if it were combined with the email pattern above, the error above would not exist. Of course, the best way to test an email address is to send e-mail to it. ^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$


Title: Not quite perfect
Name: Ian Ring
Date: 4/4/2003 11:56:11 AM
Comment:
A very good pattern, except that it allows some invalid IP addresses. For example, it matches this: [email protected] even though each part of an IP must be from 0-255


Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials