Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 338
  • Last Modified:

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
0
MrKevorkian
Asked:
MrKevorkian
  • 2
1 Solution
 
käµfm³d 👽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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now