I have always been against using regular expressions for email validation. The spec is just too complex. So many forms validate
firstname.lastname@example.org as an error. Which is incorrect. So in the spirit of learning regex, I decided to try my hand. This pattern seems to match quite well for everything I have thrown at it. It is loose enough to allow flexibility, but strict enough to not let the blatant errors get by.
^((\S+)@(.+)(\.)(\S+))$ # Ruby only
Thoughts on it?