Fixed regex for email validation

Fixed regex as explained in the issue tracker. Also removed trailing spaces.