Hi all

I need to check an input value against the following criteria

1. Length 1 - 10 characters
2. Each character may be either "C" or "N"
3. All C's must be in a group, so CCNNC would be invalid
4. All N's must be in a single group (as above)
5. Can be all C's
6. Can be all N's
7. Can be x C's followed by y N's
8. Can be x N's followed by y C's
9. 1 <= x+y <= 10 (same as 1 above, really)

Any suggestions for a regex that would test for this would be really appreciated

Many thanks

Paul Newton



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to