HighTechTalks DotNet Forums  

REGULAREXPRESSION - identify specific value(s) as INVALID

ASP.net Web Controls microsoft.public.dotnet.framework.aspnet.webcontrols


Discuss REGULAREXPRESSION - identify specific value(s) as INVALID in the ASP.net Web Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Skinnerfritz
 
Posts: n/a

Default REGULAREXPRESSION - identify specific value(s) as INVALID - 06-20-2008 , 10:13 AM






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!!


Reply With Quote
  #2  
Old   
Skinnerfritz
 
Posts: n/a

Default RE: REGULAREXPRESSION - identify specific value(s) as INVALID - 06-20-2008 , 12:43 PM







Use a negative look-ahead:

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


"Skinnerfritz" wrote:

Quote:
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!!


Reply With Quote
  #3  
Old   
Skinnerfritz
 
Posts: n/a

Default RE: REGULAREXPRESSION - identify specific value(s) as INVALID - 06-20-2008 , 12:43 PM




Use a negative look-ahead:

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


"Skinnerfritz" wrote:

Quote:
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!!


Reply With Quote
  #4  
Old   
Skinnerfritz
 
Posts: n/a

Default RE: REGULAREXPRESSION - identify specific value(s) as INVALID - 06-20-2008 , 12:43 PM




Use a negative look-ahead:

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


"Skinnerfritz" wrote:

Quote:
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!!


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.