Fixed regex for email validation

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