email regex - with limit on number of characters

hi,

i am using asp.net 3.5

i am using this in my regular expression validator:

^([a-zA-Z0-9_.'-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$

I need to be able to add to it - I need to add
the whole email address can only be between 6 - 100 characters.

thanks
LVL 1
MrKevorkianAsked:
Who is Participating?
 
käµfm³d 👽Connect With a Mentor Commented:
Try this:
^(?=.{6,100}$)([a-zA-Z0-9_.'-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$

Open in new window

0
 
MrKevorkianAuthor Commented:
thanks
0
 
käµfm³d 👽Commented:
NP. Glad to help  : )
0
All Courses

From novice to tech pro — start learning today.