The parser of some regex engines is more nitpicky than the others. However, they generally parse the regex correctly if you put -
at the end of a character class.
"^[_A-Za-z0-9+-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"
^^