I have three text boxes. I need:
- Regular expression to only allow 3 upper case alphabets. No empty strings and no numbers
- Regular expression to allow only 3 numbers. no empty strings
- Regular expression for 5 or fewer uppercase alphabe开发者_JS百科ts only. no empty strings, no numbers
This should do it:
1. ^[A-Z]{3}$
2. ^[0-9]{3}$
3. ^[A-Z]{1,5}$
Expresso is a usefull regular expression tool that allows you to build your own regular expressions by selecting options from a form. It will be very easy to create what you have asked for above.
精彩评论