Regular Expression Help

Discussion in 'ASP .Net Web Controls' started by sam, Dec 9, 2005.

  1. sam

    sam Guest

    Hello,
    We have a textbox on a web form (ASP.NET 2.0 - C#) that is for end-users to
    enter e-mail address(es). The valid entries are:


    ;; (notice no space after
    the semicolon)
    ; ; (notice the space
    after the semicolon)

    Basically, the user can enter 1 e-mail address or more than 1 e-mail address
    separated by a semicolon.

    Can the RegularExpressionValidator control handle this situation?
    If not, is there another way to validate this?

    Thanks!
     
    sam, Dec 9, 2005
    #1
    1. Advertising

  2. sam

    Guest

    To avoid obfuscating the code, I would do this custom. As in split on
    all the e-mail separators (most people allow for space, camma,
    semicolor, and new line) and then regexp against each. If one fails,
    they all fail.
     
    , Dec 11, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anand

    Regular Expression help...

    Anand, Jul 9, 2003, in forum: Perl
    Replies:
    1
    Views:
    1,243
    Eric J. Roode
    Jul 9, 2003
  2. Eric B.
    Replies:
    1
    Views:
    437
    Jim Gibson
    Dec 17, 2004
  3. VSK
    Replies:
    2
    Views:
    2,355
  4. =?iso-8859-1?B?bW9vcJk=?=

    Matching abitrary expression in a regular expression

    =?iso-8859-1?B?bW9vcJk=?=, Dec 1, 2005, in forum: Java
    Replies:
    8
    Views:
    873
    Alan Moore
    Dec 2, 2005
  5. GIMME
    Replies:
    3
    Views:
    12,025
    vforvikash
    Dec 29, 2008
Loading...

Share This Page