Click here to Skip to main content
15,169,249 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i have a textbox..

i want that user can only enter number,string,slash, space and hypen only

in regex.. please help me on this
VJ Reddy 13-Jun-12 20:15pm
Thank you for viewing and accepting the solution :)

The pattern
^[0-9a-zA-Z/ -]+$
can be used for the above purpose.

It can be tested here[^]
Sure, a 5.
VJ Reddy 13-Jun-12 3:19am
Thank you, SA :)
Manas Bhardwaj 13-Jun-12 4:09am
Correct +5!
VJ Reddy 13-Jun-12 4:30am
Thank you, Manas :)
Manas Bhardwaj 13-Jun-12 4:09am
Correct +5!

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