Click here to Skip to main content
15,897,226 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi team,
I am validating an text box in asp.net in such a way that:
1.String should be alpha-numeric.
2.String should be of 12 characters long.

I have a very weak concept of regular Expression in ASP.net.
Please help me to get that expression. and help me to learn that in an easy way.
Posted

Try:
\w{12}
 
Share this answer
 
This works for me

^[a-zA-Z0-9]{12}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900