So I want to set up an Email Address Validation Regex with the following constraints...
reference: α
@ β
. γ
for α
1) Only contain a-z
0-9
.
-
_
2) Contain between 1 and 30 chars (inclusive)
3) Can't start or end with .
-
_
4) Can't have 2 consecutive symbols (out of .
-
_
) in it
for β
1) Only contain a-z
0-9
-
2) Contain between 2 and 14 chars (inclusive)
3) Can't start or end with -
4) Can't have 2 consecutive -
in it
for γ
1) Only contain a-z
2) Contain between 2 and 4 chars (inclusive)
===========================================================================
The first two constraints of each are easy to implement, So I have done it, as follows
([a-z0-9.\-_]{1,30})@([a-z0-9\-]{2,14}).([a-z]{2,4})
Can anyone help me with (2) and (3) of α
and β