Got more questions? Find advice on: ASP | SQL | XML | Windows
in Search
Welcome to RegexAdvice Sign in | Join | Help

email address not exceeding 100 characters

Last post 07-01-2009, 10:18 AM by mash. 3 replies.
Sort Posts: Previous Next
  •  06-30-2009, 8:44 AM 54440

    email address not exceeding 100 characters

    Platform:web browsers.(it uses JavaScript)

    Activity:validation.

    I have to ensure that an email address entered by use don't exceed 100 characters.

    for this i can use regular expression

    what is the regular  expression for an email address not exceeding  100 characters

     

     

    Filed under:
  •  06-30-2009, 10:41 AM 54448 in reply to 54440

    Re: email address not exceeding 100 characters

    There is no such regular expression.  First off you can't validate an email address 100% with a regular expression. Attempting to validate as close as possible requires a ridiculously large pattern that is not practical to use. Shorter pattern have many many holes within and should not be used if validation is important.  Limiting such an expression to 100 character would only make it more capable of failure.

    if you just wanted to be sure a string, not necessarily an email address, is not more than 100 characters this pattern would do so.

    ^.{0,100}$


    Michael

    "In theory, theory and practice are the same. In practice, they are not."
    Albert Einstein
  •  07-01-2009, 1:41 AM 54464 in reply to 54448

    Re: email address not exceeding 100 characters

    Thanks,

    how  can I mark ,the issue is answered  or your  replay is the answer 

    some other forums privide  abutton "Mark as answer"

    but  i cant find it here.

     

  •  07-01-2009, 10:18 AM 54473 in reply to 54464

    Re: email address not exceeding 100 characters

    Sorry we don't have that feature.

    Michael

    "In theory, theory and practice are the same. In practice, they are not."
    Albert Einstein
View as RSS news feed in XML