Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Controls / June 2008

Tip: Looking for answers? Try searching our database.

REGULAREXPRESSION - identify specific value(s) as INVALID

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Skinnerfritz - 20 Jun 2008 16:13 GMT
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 - 20 Jun 2008 18:43 GMT
Use a negative look-ahead:

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

> Hey all,
>
[quoted text clipped - 13 lines]
>
> Thanks in advance!!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.