Regular Expression Validator

  • Thread starter Thread starter Yoshitha
  • Start date Start date
Y

Yoshitha

Hi,
In my application am using

RegularExpression Validator Controls

for some text boxes.

how to set validExpression for the

following ones

1. T1 should accept character data

only,it doesnt allow to enter special

characters,digits and ,<,>,?,",., etc
i have set the property like this /D
but it not accept any thing including

characters also.

2.T2 should accept only numbers it

wont accept any cahracter

data,special symbols and ,<,>,?,",., etc

Can any one tell me how to set

expressions for this.

Thanx in advance
Yoshitha
 
Hi Yoshita,

I would highly recommend http://RegExLib.com to help you with regular
expressions.

To answer your questions:
1. To match any alpha character, but no special characters you can use:
^[a-zA-Z]$

2. To match any numeric digit, but no special characters you may use:
^\d+$

Hope this helps.

Tod Birdsall, MCP
http://tod1d.blogspot.com
 
Back
Top