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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^((\"[^\"\f\n\r\t\v\b]+\")|([\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+(\.[\w\!\#\$\%\&\'\*\+\-\~\/\^\`\|\{\}]+)*))@((\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9\-])+\.)+[A-Za-z\-]+))$
Description
Email address validator. Should cover most of RFC 822, including unusual (but still valid) addresses. Does not restrict the top level domain size, but you're better off doing an nslookup or similar if you absolutely must have a valid domain. Accepts IP Addresses instead of the domain, with or without brackets. Believe it or not, this one is valid: !#$%^&*-+~/'`|{}@xyz.com Sorry looks like this site is mangling the quote and ampersand characters - you'll have to fix that yourself.
Matches
/A/Wacky/[email protected] | bob.builder@[1.1.1.1] | "blah b. blahburger"@blah.com
Non-Matches
./A/Wacky/[email protected] | bob.builder@[256.1.1.1] | -"blah b. blahburger"@blah.com
Author Rating: Not yet rated. Roger Ramjet
Source Roger Ramjet
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: Hi
Name: anom
Date: 9/23/2007 6:10:39 AM
Comment:
Good one, but a little long


Title: RE: Error
Name: John Mellor
Date: 7/3/2006 10:03:42 PM
Comment:
[email protected] is perfectly valid actually. 103.nl is a valid domain (for example http://24.com is a website, try it!), and 62.59.114 are simple subdomains of that.


Title: Error
Name: David van Leerdam
Date: 9/10/2004 7:18:29 AM
Comment:
[email protected] also validates while it is not


Title: Bug In Domain Validation
Name: Kiril
Date: 8/24/2004 12:24:51 PM
Comment:
According to RFC 3696 ( http://www.faqs.org/rfcs/rfc3696.html ), hyphens are not allowed to prepend or append a domain label. Therefore an address such as [email protected] should fail, however it doesn't.


Title: boy
Name: steve
Date: 6/12/2004 8:28:04 AM
Comment:
very good


Title: no special characters
Name: Olaf
Date: 4/24/2004 2:28:12 AM
Comment:
Hi the new special characters in URLs are not accepted: irgendwer.0815a-QQ4@team-nöhring.museum the Ö does not work. Olaf


Title: does not match \" inside quoted string
Name: trillian
Date: 4/9/2004 3:09:59 PM
Comment:
Does not match "x \" x"@x.x That is, does not match \" inside quoted string (see RFC 2822, 3.2.5. Quoted strings) Otherwise really good :)


Title: Not really an error
Name: Frank Stocker
Date: 2/6/2004 3:19:09 AM
Comment:
I have seen an internet address that is very strange. But check out yourself ;-) http://www.-.kg/ --> an email is: [email protected]


Title: Error
Name: Gavin Sharp
Date: 12/23/2003 4:17:02 AM
Comment:
[email protected] is validated erroneously. Domain names cannot begin with a symbol (dash). http://www.regexlib.com/REDetails.aspx?regexp_id=295


Title: :)
Name: :)
Date: 12/18/2003 4:00:11 AM
Comment:
try this : ^(([^<>;()[\]\\.,;:@"]+(\.[^<>()[\]\\.,;:@"]+)*)|(".+"))@((([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))\.)*(([a-z]([-a-z0-9]*[a-z0-9])?)|(#[0-9]+)|(\[((([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\.){3}(([01]?[0-9]{0,2})|(2(([0-4][0-9])|(5[0-5]))))\]))$


Title: So Good!
Name: Find it so long time.
Date: 12/18/2003 3:57:00 AM
Comment:
Really good


Title: Perl 5 test
Name: Brian Lee
Date: 8/8/2003 3:16:34 AM
Comment:
This doesn't work for some of the most common Strings.


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