Regular Expression Validator

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
 
T

Tod Birdsall

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,052
Members
48,769
Latest member
Clifft

Latest Threads

Top