I always find regular expressions a headache, and googling didn't really help. I am currently using the following expression (preg_match):/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/
However, if I want to allow emails with plus characters, this obviously will not work, for example: foo+bar@domain.com
How do I need to change my expression so that it can be done? Thank you in advance for your help!
source
share