REGULAREXPRESSION - identify specific value(s) as INVALID

Discussion in 'ASP .Net Web Controls' started by Skinnerfritz, Jun 20, 2008.

  1. Skinnerfritz

    Skinnerfritz Guest

    Hey all,

    I'm looking for some help on coding a validationexpression of regular
    expression validation control in C#.

    The problem is simple..and it would seem the solution likely is as well.
    But I haven't come up with it.

    I'd like to validatie a textbox entry.

    The entry must be 6 digits. And must NOT equal any of the following four
    values : 110500, 101100, 109900, 101007.

    I've tried a number of things to no avail. So I won't limit any of your
    collective potential solutions with the novice suggestions I've tried.

    Thanks in advance!!
     
    Skinnerfritz, Jun 20, 2008
    #1
    1. Advertising

  2. Skinnerfritz

    Skinnerfritz Guest

    Use a negative look-ahead:

    (?!110500)(?!101100)(?!109900)(?!101007)\d{6}


    "Skinnerfritz" wrote:

    > Hey all,
    >
    > I'm looking for some help on coding a validationexpression of regular
    > expression validation control in C#.
    >
    > The problem is simple..and it would seem the solution likely is as well.
    > But I haven't come up with it.
    >
    > I'd like to validatie a textbox entry.
    >
    > The entry must be 6 digits. And must NOT equal any of the following four
    > values : 110500, 101100, 109900, 101007.
    >
    > I've tried a number of things to no avail. So I won't limit any of your
    > collective potential solutions with the novice suggestions I've tried.
    >
    > Thanks in advance!!
    >
     
    Skinnerfritz, Jun 20, 2008
    #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. Learning SQL Server

    Email RegularExpression not working

    Learning SQL Server, Aug 7, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    2,496
    Chris R. Timmons
    Aug 8, 2003
  2. Stephan Bour
    Replies:
    2
    Views:
    7,215
    Stephan Bour
    Oct 28, 2003
  3. Pranav Kantawala
    Replies:
    5
    Views:
    767
    P.Hill
    Feb 25, 2004
  4. Replies:
    9
    Views:
    631
    James Kanze
    Sep 19, 2007
  5. Skinnerfritz
    Replies:
    5
    Views:
    364
Loading...

Share This Page