Gribēju uzrakstīt jaunu regulāro ekspresiju priekš e-pasta adresēm, sāku meklēt nepieciešamo informāciju par e-pasta adrešu formātu, un atradu šo:

According to RFC 2822, the local-part of the address may use any of these ASCII characters:

* Uppercase and lowercase letters (case sensitive)
* The digits 0 through 9
* The characters ! # $ % & ‘ * + - / = ? ^ _ ` { | } ~
* The character . provided that it is not the first or last character in the local-part.

Un:

Additionally, RFC 2821 and RFC 2822 allow the local-part to be a quoted-string, as in “John Doe”@example.com, thus allowing characters in the local-part that would otherwise be prohibited. However, RFC 2821 warns: “a host that expects to receive mail SHOULD avoid defining mailboxes where the Local-part requires (or uses) the Quoted-string form”.

Citāti ir no http://en.wikipedia.org/wiki/E-mail_address.

“local part” ir viss tas, kas ir pirms @ zīmes.

Svarīgākais, ko gribēju izcelt ir ! # $ % & ‘ * + - / = ? ^ _ ` { | } ~ simbolu izmantošana e-pasta adresēs, un to, ka it kā ir legāli, kaut nav ieteicams, reģistrēt e-pasta adreses, kuras var saturēt atstarpes, piem., tas pats “John Doe”@example.com. Teorētiski tas nozīmē, ka manai regulārai expressijai būtu jāatzīst par labu esam e-pasta adrese “/}{axZ0r t&4m 0F $!$$!3$/”@example.com .

Laikam pagaidām būs jāpieturās vēl pie vecās expressijas.