- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I don't know if I've ever seen a toilet with the flusher placed so low that I've need to bend over so much that I'd be in danger of losing something out my pocket. Maybe you are freakishly tall? Besides, for public restrooms, I usually just use my foot to flush.
Admin
Lucky, lucky man!
Admin
Wow, never thought I'd see so many people hating mobile phones, I take the opposite approach, I don't have a land-line, anyone who wants to contact me can call my mobile (if I decide to answer or not is a different matter)
Admin
FTFY
Admin
I have my own domain, so every company I deal with gets a unique email address. I know that Home Depot has had their list comprised as well as NTI (http://www.ntius.com/en/us/home/Default.asp). Broderbund will sell your address to EVERYONE with your other registration details. BJ's wholesale sends personalized emails to the address that I only gave to Broderbund so they must have cross referenced with their own member database.
Admin
I have my own domain as well. There are TWO problems (to name some). You get emails addressed to every name in the book (and some that aren't) with your domain attached. And you get the joy of finding out just where your email addresses go. I too add a prefix to email addresses requested by web sites. It has a nice character ('-') in it, which fails MANY regex parsers mentioned in the comments. I also get LOTS of "confirmation" emails to new addresses which I can hopefully turn off before they become to nasty.
One of my email addresses I've forwarded back to the "complaints" address, but I don't think it does anything. It was for a survey I took long ago. Yes, that (worse than useless) "CAN-SPAM" act congress wrote really worked! Why did they even bother?
Admin
That's not true. T-Mobile does and AT&T does. Both are GSM that use SIM cards. Both carriers do so for contract as well as pre-paid.
Admin
That's strange, both my wife and myself have tracfone systems, which are by the same company. Both of them have SIM cards.
I've been told that these companies have different carriers in different parts of the country. That may explain the difference.
Admin
I don't have a cell phone. Yay!!!
A few of my co-workers recently got Blackberrys, and in order to let the Blackberrys retrieve e-mail, they need Outlook to leave the e-mail on the server for a few days. Of course, some of them changed their Outlook setup to leave e-mail on the server forever, which of course means everyone sending them e-mail started getting messages saying "the recipient's mailbox is full" (full at the ISP).
I politely suggested that when people are away from the office, they need to get a life and not worry about their e-mail.
Admin
In the US their are two main systems:
GSM (Sim cards): AT&T T-Mobile
CDMA: Verizon Sprint
There's also Alltel. I'm not sure what system they use, but they just got bought out by Verizon.
Others like Net10, Boost, Tracfone, etc., sale service that uses the towers owned by the other companies.
Verizon & AT&T are the two biggest as far as subscribers.
Admin
Why didn't he turn javascript off?
Admin
I have a G'Zone Boulder. It's a huge improvement over the Type-S and Type-V. It lacks the silly bumper thing that was on the bottom of the Type-V, and it's a lot smaller and easier to hold. Lots more internal memory than the earlier G'Zones, as well as most of the standard-ish features the others were lacking, e.g. Bluetooth, push-to-talk, microSD card. Even a built-in compass.
Admin
In short, do your research and stop being such an arse. GSM, SIM cards, CDMA, and your stupid europe vs america pissing fight aren't even related to the original post anyways.
Admin
I use Sprint and there is no SIM card in my phone. Of course, I bought this phone (yes, I rejected their offer to hold me ransom for 3+ years and paid for my phone directly) more than two years ago. I'm not sure if this has changed, but my GF's phone (Verison I think) also doesn't have a SIM card.
I too specifically requested that my cell phone not have any special bells or whistles. In particular I requested that it NOT come with a camera as I would not have been able to bring it into the secure hosting facilities in which many of my clients had their equipment. The bewildered look on the sales person's face was priceless.
Admin
"Regexes don't write obfuscated code, people write obfuscated code"
"You can take my regexes when you pry them from my cold, dead fingers"
Admin
For one thing, it rejects everyone with a TLD of more than 3 letters: .name, .mobi, .info, .aero, .museum, .travel are all valid TLDs.
Admin
Last time I bought a cell phone, I wanted the (apparently) never asked for feature of "good reception." I don't care if it takes pictures or plays music. I want a phone that works in my house and my office. All the phones that I've owned have either been one or the other, but never both.
One particular sales guy tried to convince me how all phones ever invented are the same and it wasn't possible for my wife's phone to work in a place where mine didn't if we were on the same network. It's amazing what people will do to avoid saying "I don't know and I don't know how to find out even though I should know because I work here."
Admin
You get a free phone every 2 years, even on pay-as-you go?
Admin
...so I guess we've now established that Code Dependent is the only one round here who knows how to use a toilet brush.
Me on the other hand, my shit just doesn't stick.
Admin
one of the regular services in the US use SIMs? AT&T does, T-Mobile does, Just got a new Verizion Blackberry at work, that came with a SIM. What are you talking about
Admin
Admin
Doesn't it break with [email protected]?
Or am I missing something?
Admin
(That last was me... and I missed a greaterthan...)
Admin
I just saw the first two paragraphs as a way to forestall any "WTF are Net 10?" comments.
Admin
Most public toilets here in the States aren't equipped with brushes. The bowl is full of water so your shit won't normally stick unless you have explosive diarrhea.
I've been to Europe and can tell you it took me a bit to get used to toilets that pretty much require the use of a brush after each use.
Admin
Sprint's Nextel phones also use SIMs.
Admin
Apparently whether the Net10/Tracfone phone uses a SIM card depends on the service they contract with in your home area, GSM or CDMA. The GSM phones have the SIM cards.
But when the Net10/Tracfone has a SIM card, the Net10/Tracfone billing service is tied to the SIM card and phone's serial numbers. You can't take a SIM card from one Net10/Tracfone and stick it in another because the phone serial number doesn't match.
You might be able to take the SIM card from the original phone, copy the address book to it, swap it into the new phone, and while the phone is unable to connect copy the address book to the new phone's memory before switching back to the new phone's SIM card.
Admin
Admin
One Perl program I worked on had the following e-mail regex, which accepted the username@[123.123.123.123] notation, and allowed whitespace and other characters to appear in addresses:
It was not IPv6 compliant, unfortunately, and didn't accept IP addresses in decimal notation, where 123.123.123.123 becomes 2071690107.
The expression was designed to pick a valid e-mail address wherever one could be discerned, so you could paste in a typical From: line, such as "Joe User" [email protected], and it would get [email protected] out of it.
Admin
Well not after each use actually, only when you have an American diet.
Admin
function valid_email(email){var tlds = ['AC','AD','AE','AERO','AF','AG','AI','AL','AM','AN','AO','AQ','AR','ARPA','AS','ASIA','AT','AU','AW','AX','AZ','BA','BB','BD','BE','BF','BG','BH','BI','BIZ','BJ','BM','BN','BO','BR','BS','BT','BV','BW','BY','BZ','CA','CAT','CC','CD','CF','CG','CH','CI','CK','CL','CM','CN','CO','COM','COOP','CR','CU','CV','CX','CY','CZ','DE','DJ','DK','DM','DO','DZ','EC','EDU','EE','EG','ER','ES','ET','EU','FI','FJ','FK','FM','FO','FR','GA','GB','GD','GE','GF','GG','GH','GI','GL','GM','GN','GOV','GP','GQ','GR','GS','GT','GU','GW','GY','HK','HM','HN','HR','HT','HU','ID','IE','IL','IM','IN','INFO','INT','IO','IQ','IR','IS','IT','JE','JM','JO','JOBS','JP','KE','KG','KH','KI','KM','KN','KP','KR','KW','KY','KZ','LA','LB','LC','LI','LK','LR','LS','LT','LU','LV','LY','MA','MC','MD','ME','MG','MH','MIL','MK','ML','MM','MN','MO','MOBI','MP','MQ','MR','MS','MT','MU','MUSEUM','MV','MW','MX','MY','MZ','NA','NAME','NC','NE','NET','NF','NG','NI','NL','NO','NP','NR','NU','NZ','OM','ORG','PA','PE','PF','PG','PH','PK','PL','PM','PN','PR','PRO','PS','PT','PW','PY','QA','RE','RO','RS','RU','RW','SA','SB','SC','SD','SE','SG','SH','SI','SJ','SK','SL','SM','SN','SO','SR','ST','SU','SV','SY','SZ','TC','TD','TEL','TF','TG','TH','TJ','TK','TL','TM','TN','TO','TP','TR','TRAVEL','TT','TV','TW','TZ','UA','UG','UK','US','UY','UZ','VA','VC','VE','VG','VI','VN','VU','WF','WS','YE','YT','YU','ZA','ZM','ZW'];if (email!= null&&email!= ""){var emailPattern = /^\w.*@([-a-z0-9]+.)+[a-z]+$/i;if (!emailPattern.test(email)){alert("The email address supplied is not valid or has errors. Make sure the address matches the format [email protected].");return 0;} var isValidTLD=false;var tldIndex = email.lastIndexOf(".")+1;if ( 0 < tldIndex && tldIndex < email.length ){var tld = email.substr(tldIndex).toUpperCase();for (i=0; i<tlds.length; i++){if(tld==tlds[i]){isValidTLD = true;break;}}};if (!isValidTLD){if (!confirm("The email address supplied does not contain a valid top level domain (such as .com or .org). Is this really OK? (click Cancel to fix)")){return 0;}}}else{alert("Please include a valid email address in the "Email" field.");return 0;};return 1;}
Admin
You can also check to see if an email exists without sending mail to it.
http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/
Captcha: sagaciter. How exciting!
Admin
Wonder why they don't use regexps to validate emails? Here is how you do it with regexps correctly:
(?:(?:\r\n)?[ \t])(?:(?:(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t] )+|\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?: \r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:( ?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t])))@(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\0 31]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)
](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+ (?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?: (?:\r\n)?[ \t])))|(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z |(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n) ?[ \t]))<(?:(?:\r\n)?[ \t])(?:@(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:
r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n) ?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t] )))(?:,@(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])* )(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t] )+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])))) :(?:(?:\r\n)?[ \t]))?(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+ |\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r \n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?: \r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t ]))"(?:(?:\r\n)?[ \t])))@(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031 ]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)]( ?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(? :(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(? :\r\n)?[ \t])))>(?:(?:\r\n)?[ \t]))|(?:[^()<>@,;:\".[] \000-\031]+(?:(? :(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)? [ \t]))"(?:(?:\r\n)?[ \t])):(?:(?:\r\n)?[ \t])(?:(?:(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]| \.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<> @,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|" (?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t])))@(?:(?:\r\n)?[ \t] )(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\ ".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(? :[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[ ]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])))|(?:[^()<>@,;:\".[] \000- \031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|( ?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t]))<(?:(?:\r\n)?[ \t])(?:@(?:[^()<>@,; :\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([ ^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\" .[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[
]\r\]|\.)](?:(?:\r\n)?[ \t])))(?:,@(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".
[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]
r\]|\.)](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\] |\.)](?:(?:\r\n)?[ \t])))):(?:(?:\r\n)?[ \t]))?(?:[^()<>@,;:\".[] \0 00-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|"(?:[^"\r\]|\ .|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[^()<>@, ;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[]]))|"(? :[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t])))@(?:(?:\r\n)?[ \t]) (?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\". []]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t])(?:[ ^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[] ]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])))>(?:(?:\r\n)?[ \t]))(?:,\s( ?:(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\ ".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t]))(?:.(?:( ?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[ ["()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t ])))@(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t ])+|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(? :.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+| \Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])))|(?: [^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\".[
]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t]))<(?:(?:\r\n) ?[ \t])(?:@(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[[" ()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n) ?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<> @,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])))(?:,@(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@, ;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(?:.(?:(?:\r\n)?[ \t] )(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\ ".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])))):(?:(?:\r\n)?[ \t]))? (?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[["()<>@,;:\". []]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t]))(?:.(?:(?: \r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z|(?=[[ "()<>@,;:\".[]]))|"(?:[^"\r\]|\.|(?:(?:\r\n)?[ \t]))"(?:(?:\r\n)?[ \t]) ))@(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t]) +|\Z|(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t]))(?:
.(?:(?:\r\n)?[ \t])(?:[^()<>@,;:\".[] \000-\031]+(?:(?:(?:\r\n)?[ \t])+|\Z |(?=[["()<>@,;:\".[]]))|[([^[]\r\]|\.)](?:(?:\r\n)?[ \t])))>(?:( ?:\r\n)?[ \t]))))?;\s*)
Admin
Am I the only one wondering why nobody bothers to read all the comments before posting any more?
Admin
Ha, In Belgium it's illegal to give you a phone for free. (Couplesale)
Admin
Funny country, you can't give phones but you can give ammo to children :)
Admin
I have the exact same thing when I'm buying a new calculator. I never use division (and if I really needed to ever, I could just recursively subtract). You wouldn't believe how hard it is to get hold of calculators without all these unnecessary features. It's quite ridiculous.
Admin
I'll bet we have more sets of antennas on our towers here in the US than anywhere else in the world. Near major highway intersections, towers with 6 or more sets of antennas (each representing a carrier) are not uncommon. Nothing like duplication of equipment and incompatible standards to encourage business!
Admin
My mobile phone company doesn't offer me online management of my account, so that line in the article is incorrect! My plan is from 2001 (very grandfathered) and the "new" billing system doesn't support it so I'm stuck on the "old" billing system, which does not support the online features. The person on the phone told me I'm on a good plan and can see why I don't want to move away from it. We were planning on joining mine and my wife's plans onto the one account but as they don't provision any new services onto the old system and my plan can't be moved to the new system our two plans appear as two completely separate accounts.
Admin
Meh... get over it
Admin
So now I know who to blame when I get "love letters" for unrequested opt-ins on my sites :P
Admin
TRWTF is that my company blocks imageshack... but not youtube.
Admin
"You can also check to see if an email exists without sending mail to it."
No you can't. That method is not accurate at all.
Admin
Note that the example in TFA would reject a properly formed email address "[email protected]." -- the final dot is a FQDN terminator, and it prevents the lookup from attempting to descend any further. Evidently it was seen as "absolute crap" by the author. In the light of that, what kind of "absolute crap" would you be rejecting?
Admin
Precisely. Why write a single regex?
Personally, I split the string at the "@" sign, and treat LHS and RHS separately. RHS is validated for being a potential domain name (including FQDN with a terminating period), then the TLD is compared against the current latest list of TLDs. The LHS is checked against the rules for usernames. It's pretty simple really, and is far simpler to debug than the black box approach.
Regexes are useful, but they should also be something you can come back to and update without having to relearn it for a week.
Admin
Yes. Everyone else knows patience is a rare commodity these days. Even your mother knows that - but she may not be patient enough to share it with you. ;)
Admin
Doesn't allow some valid emails, and allows some invalid emails. Even without going into the more obscure aspects of it*... The username may, for example, contain other punctuation than you have allowed (the + sign is popular, since it will, for example, automatically apply a label in gmail). You may be surprised to learn that neither the username nor the hostname is allowed to begin or end with a dot or contain two consecutive dots. The top-level-domain may contain more than four letters (.mobi, .museum, etc), and while there are none with only one letter, that possibility cannot be ruled out for the future. You also forbid emails that are simply @com or @org (maybe there are no emails at those addresses, but can you guarantee that for ALL top-level domains?)
*incidentally, that HUGE regex you sometimes see floating around (and of course someone just HAD to link it in an earlier reply) allows things that aren't necessary to fully specify an email address, including obsolete multiple-mailbox syntax
Admin
NO. Neither RFC 2822 nor RFC 2821 allows either the username or the host portion of an email address to begin or end with a dot. Validating email addresses is hard enough without people giving INVALID examples that "ought to pass" - why not go back to ".@." if you're going to take that approach?
Admin
For one, because it doesn't allow numbers on either side of the @-sign. And also, because it doesn't validate for the newer tld's such as .museum and .travel . Also note that there are a whole lot of special characters in the original regex that yours doesn't take into account.
Admin
Dear god, that's atrocious LOL!