Fixed some regex errors

Update regex for email validation
Fixed some regex test() being equated to null instead of boolean values