Updated every Monday, Wednesday and Friday
22Jul2009

A Solution To E-Mail Validation

Whenever it comes time to validate an email address, I always end up going through the same exact process.

I start with a simple regular expression- for example, this:

(.+)@[\w]+\.[a-zA-Z]+

It works great for a majority of email addresses- however, it’s not perfect. It lets through a lot of invalid email addresses. For example, “.name@something.a” is considered a valid email address by this regular expression. So, let’s take a few steps to correct this:

([-a-zA-Z0-9])([-.a-zA-Z0-9])*@[\w]+\.[a-zA-Z]{2,5}

A bit better, right? But what about valid email addresses, such as john+smith@mail.something.com and $A12345@example.mobile? Same goes for the seemingly invalid email addresses such as “Abc\@def”@example.com. But, alas, these are all valid.

in Programming, Usability — by Gregory
13Jul2009

Some CodeIgniter Gotcha’s

Maybe I’m doing something wrong. In fact, for the sake of programming, I hope I am. But for the life of me, I can’t find a single benefit of frameworks that isn’t overshadowed by the negatives.

Frameworks make it easy to start out- meaning that, when facing a new project, they seem like a good idea. You don’t have to do all the boring stuff at first- and when you’re starting a new project, that’s a tempting proposition.

This topic deserves a much more thorough analysis (which many before me have done, and I’m sure I someday will), however after spending the weekend struggling with CodeIgniter, I figured I’d mention some CodeIgniter-specific problems I’ve come across.

in Programming — by Gregory

Website by Gregory Koberger
518.339.4652 | gkoberger@gmail.com
gkoberger.net | blog | about gregory