PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 26th, 2005, 02:19 AM
jsampsonPC's Avatar
jsampsonPC jsampsonPC is offline
stick a scissor in you eye
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jun 2004
Location: Pensacola, Florida
Posts: 1,572 jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)jsampsonPC User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 1 Week 6 Days 16 h 19 m 9 sec
Reputation Power: 438
Email validation ALIEN code

I would like a deeper understanding of email-validation. Specifically with the ALIEN-like string we run against user, and host in email addresses. "/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}-]+" for example. This string is used against the 'user' section of our email addresses.

All of the information I have found on email validation just takes pre-existing examples of this for granted, and offer to explanation for what this actually means. Can anybody here decypher this insane garble so I can have a better understanding as to what is actually taking place? I am not just a 'copy, paste, good - now the job is done." I want a deeper understanding Call me old-fashioned!

Jonathan
Comments on this post
jharnois agrees: rep++ for wanting to understand your code
kicken agrees: ^^

Reply With Quote
  #2  
Old June 26th, 2005, 03:32 AM
jharnois's Avatar
jharnois jharnois is offline
mod_dev_shed
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Sep 2002
Location: Atlanta, GA
Posts: 14,817 jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level)jharnois User rank is General 2nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 4 Days 7 h 14 m 56 sec
Reputation Power: 1098
By user section I assume you mean foo in foo@domain.com? No matter really, I guess. I can tell you the literal equivalent for this regular expression, but w/o seeing it in context it's hard to say exactly how it's used.

" begin string
/ begin pattern (there should be a matching / at the end of the pattern)
^ match starting at the beginning of the searched string
[ begin a character class; a set of characters
-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}- these characters literally, \\ is an escaped \, \/ is an escaped / (which is required so the interpreter doesn't think it's the end of the pattern), 0-9 is all numbers, A-Z is all upper case letters
] ends the character class
+ means to match one of the characters in the preceeding character class at least once, or "one or more times"
" ends string
Comments on this post
jsampsonPC agrees: Amazing insight into some of the deepest levels of nonsense that I have ever seen. I mean that as a
compliment too. Jeremy, you blew my mind when you answered my ALIEN-validation question(s). Thank
you, and kudos to your desire to feed on knowledge.
__________________
# Jeremy

Explain your problem instead of asking how to do what you decided was the solution.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > Email validation ALIEN code

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap