Posted by: Wayne | July 15, 2008

Regex that may scare you

I am in the middle of implementing some Java codes that validate a user’s input, and I have found that handling invalid email address formats may be much harder than I thought.

Rather than coming up with the regex for the validation by myself, I was looking for some ready-made regex for it. Luckily I found one, but that was remarkably complex than I thought. For those who are interested in it please drop by this website, http://ex-parrot.com/~pdw/Mail-RFC822-Address.html.

However, I also found that Sun Microsystems introduced JavaMail API that is dedicated to handling message and email-related work based on Java. I still need to take a closer look at that package, but my understanding so far is that the package contains several classes whose constructor somehow validates an email address when it is passed into the class’ constructor as a parameter. That may help me stay away from the validation issues by delegating it.

Posted by: Wayne | July 8, 2008

Opening this blog

I confess that I have not had any of my own blog that seriously discusses some technical issues. I have found, however, that it may be a good idea to share some issues that I face on with others in public, so that it may be beneficial to help those who may get stuck with the same problem I had beforehand. Also I can sometimes refer this blog in order to refresh my brain that hopefully aids me get some new idea.

Categories