Dear All,
My text field should accept only the following values.
AlphaNumeric[A-Z a-z 0-9]
Numeric[0-9]
& it shouldn't accept only alphabets. it should be either combination of alphanumeric or numeric.
Can i have regular expression for this to validate my field?
Thanks in Advance.

VulpesPosted Jul 25, 2012, 6:48 AM
string regExp = @"^(?=.*\d)(?=.*[a-zA-Z])[a-zA-Z0-9]+$";
EDIT:
I may have misunderstood the question. If you want to allow numeric only or alphanumeric but not alpha only, then use this instead:
string regExp = @"^(?=.*\d)[a-zA-Z0-9]+$";