modified email regex, separated regex from class and optimized code
modified regex