jayaram

jayaram

  • NA
  • 83
  • 36.2k

Regex Expressions

Aug 30 2011 9:54 AM
^[0-9]*$ -I used this is for accept digits and 

^[A-Za-z]*$ this is for alphabets

^[A-Za-z0-9]*$ I used this expression for accept digits and alphabets and
these are work correctly
and
If I entered special characters(!@$@#%$^&%&) I am getting an error message
but I can enter these characters

But my requirement is I dont want to accept special characters from my keyboard to my textbox

EX:numeric textbox can accept only digits 
other characters can not be accept 

Thanks 

Answers (15)