Click here to Skip to main content
16,017,297 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
hi all
regular expression for only digits and only special Characters
help me please

thanks in advance
Posted
Updated 9-Dec-10 22:50pm
v2
Comments
Sandeep Mewara 10-Dec-10 4:47am    
No effort.
Abhinav S 10-Dec-10 5:10am    
If you search on the internet, you will definitely get some answers.

Sure, we would but what have you tried so far?
What you are asking is pretty simple to do and one can even get that via search also! So, make some effort please.

Here is what is expected by enquirers:
1. TRY first what you want to do!
2. Formulate what was done by you that looks like an issue/not working.

Try them and tell if you face issues.
Members will be more than happy to help like this.
 
Share this answer
 
Comments
tulasiram3975 10-Dec-10 4:50am    
i have seen many web site but i did get solution thats why i did like this sorry
Sandeep Mewara 10-Dec-10 5:05am    
Ok. Try: ^[0-9\ ^ ${ } [ ] ( ) . + ? | - &]$
You can add as many special characters you like to it. A simple google search should return you this, since you say you tried, I helped you.
Try this

Regex obj = new Regex(@"[0-9]*[W]*");
 
Share this answer
 
Comments
tulasiram3975 10-Dec-10 6:17am    
Thank you

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