thehacker Posted December 5 Report Share Posted December 5 from RFC 2486 ...a valid Network Address Identifier (email address) is:username = dot-stringrealm = realm "." labellabel = let-dig * (ldh-str)ldh-str = *( Alpha / Digit / "-" ) let-digdot-string = string / ( dot-string "." string )string = char / ( string char )char = c / ( "\" x )let-dig = Alpha / DigitAlpha = %x41-5A / %x61-7A ; A-Z / a-zDigit = %x30-39 ;0-9c = < any one of the 128 ASCII characters, but not any special or SPx = %x00-7F ; all 127 ASCII characters, no exceptionSP = %x20 ; Space characterspecial = "<" / ">" / "(" / ")" / "[" / "]" / "\" / "." / "," / ";" / ":" / "@" / %x22 / CtlCtl = %x00-1F / %x7F ; the control characters ; (ASCII codes 0 through 31 inclusive and 127) Quote Link to comment Share on other sites More sharing options...
dialectics Posted December 5 Report Share Posted December 5 if you are using perl, you can try this regular expression:(taken from rootworks.com/rx - where i learned regexp 5 years ago) if ($c =~ /^([a-zA-Z\-_]+)@(([a-zA-Z\-_]+)\.)+([a-zA-Z]+)$/) { print "YES! - probably an email address\n"; print "user was $1\n"; print "domain was $2\n"; print "TLD was $3\n"; } else { print "definitely NOT an email address, loser\n"; } Quote Link to comment Share on other sites More sharing options...
remy5150 Posted December 5 Report Share Posted December 5 this works in php if ((!$email) || ($email=="") || (!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$email))) { echo "Put in a valid email... stoooopid" } Quote Link to comment Share on other sites More sharing options...
thehacker Posted December 5 Author Report Share Posted December 5 well, here's my hack in coldfusion:<cfif NOT refindnocase("^(([0-9A-Za-z_\-]+\.)*)(([0-9A-Za-z_\-])+)(@)(([0-9A-Za-z_\-]+\.)+)([0-9A-Za-z_\-]{2,})$",attributes.email)> <cfset valid = 0> <cfset user_error = listappend(user_error,"Email address is not properly formatted.","|")></cfif>basically it'll accept things like:are.you.receiving.me@domain.co.ukme@domain.comyou@minnesota.museum [yes it is a TLD - i was surprised too!]hi_there-mr.crazy@person.comobviously it would be nice to accept the IP-address variant too.is it:blah@[0.0.0.0]or...bleck@0.0.0.0?why coldfusion? because i'm a sadomasochist.and it also happens to be my workplace standard. mer. Quote Link to comment Share on other sites More sharing options...
remy5150 Posted December 5 Report Share Posted December 5 coldfusion? because i'm a sadomasochist.and it also happens to be my workplace standard. mer. ROFL Quote Link to comment Share on other sites More sharing options...
loch Posted December 5 Report Share Posted December 5 whoops. took a wrong turn and i ended up in geekville. Quote Link to comment Share on other sites More sharing options...
thehacker Posted December 5 Author Report Share Posted December 5 Originally posted by remy5150 coldfusion? because i'm a sadomasochist.and it also happens to be my workplace standard. mer. ROFLyo did you build that clubrips.com site?shit is TIGHT! Quote Link to comment Share on other sites More sharing options...
remy5150 Posted December 6 Report Share Posted December 6 Thanks bro... it's my first website Quote Link to comment Share on other sites More sharing options...
scoob-e Posted December 6 Report Share Posted December 6 <-happy hes a networker and not a programmer Quote Link to comment Share on other sites More sharing options...
schwingep Posted December 6 Report Share Posted December 6 10 REM **This is fun**20 For n=1 to 10030 Print "This is fun";40 Next n50 endWant me to do some stuff for you in Logo?Show Turtle, Hide Turtle - Pete Quote Link to comment Share on other sites More sharing options...
thehacker Posted December 6 Author Report Share Posted December 6 Originally posted by schwingep 10 REM **This is fun**20 For n=1 to 10030 Print "This is fun";40 Next n50 endWant me to do some stuff for you in Logo?Show Turtle, Hide Turtle - Pete :laugh: :laugh: Quote Link to comment Share on other sites More sharing options...
remy5150 Posted December 6 Report Share Posted December 6 Originally posted by scoob-e <-happy hes a networker and not a programmer <- happy hes getting that six figure salary everyone told him he'd get:mad: Quote Link to comment Share on other sites More sharing options...
thehacker Posted December 6 Author Report Share Posted December 6 Originally posted by remy5150 <- happy hes getting that six figure salary everyone told him he'd get:mad: what's what smell... is it...*sniff sniff*SarCasm? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.